[GENERAL] table locks

2006-12-25 Thread Ilja Golshtein
Hello! I need table locks to provide application logic. Just very common lock types with very common behavior - Shared and Exclusive. Which PostgreSQL's lock modes should be preferred in order to avoid conflicts with autovacuum and suchlike? Or, may be, the best option for me is a contrib mod

Re: [GENERAL] table locks

2006-12-25 Thread Martijn van Oosterhout
On Mon, Dec 25, 2006 at 02:58:26PM +0300, Ilja Golshtein wrote: > Hello! > > I need table locks to provide application logic. Just very common lock types > with very common behavior - Shared and Exclusive. > > Which PostgreSQL's lock modes should be preferred in order to avoid conflicts > with

Re: [GENERAL] Merry Christmas!

2006-12-25 Thread Raymond O'Donnell
On 24 Dec 2006 at 23:38, Dawid Kuroczko wrote: > It's been great year, and I'm constantly amazed at the consistency and > steady development of our favourite Database -- many thanks for all who > take part in it -- it's great to have you! Merry Christmas!!! Amen to all of the above, and happy C

Re: [GENERAL] out of memory woes

2006-12-25 Thread Angva
Alvaro Herrera wrote: > That's not a problem because it's just a limit. It won't cause out of > memory or anything. Ah, I see. Well, it's nice to have caught that anyway, I suppose. > The problem with work_mem is that the system may request that much > memory for every Sort step. Each query may

[GENERAL] Need some Technical support !!!

2006-12-25 Thread Mohan Kumar Thangaraj
Hi, I have a UML diagram and which contains DataBase Design. The tables and columns can contain some relationship. this all in "ALLFusion ERwin Data Modeler" the file is saved as ".erwin". I want to use the PostgreSQL DataBase, so i want save all the Tables and colums with relationship in the Pos

Re: [GENERAL] out of memory woes

2006-12-25 Thread Angva
Well I adjusted work_mem, ran pg_ctl reload, verified that the setting change took place by running "show work_mem", but I am noticing zero difference. I am noticing no performance difference in the clustering, and the out of memory errors still occur. First I halved work_mem, reducing it to 10

Re: [GENERAL] A trigger question

2006-12-25 Thread Chansup Byun
On 12/20/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Mon, Dec 18, 2006 at 22:18:43 -0500, Chansup Byun <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to set up a trigger to prevent any duplicate entries into > my table. But I couldn't figure out how to make my trigger work. Couldn't you

[GENERAL] Has anyone used the libpqxx C++ API for PostgreSQL

2006-12-25 Thread af300wsm
Hello everyone, If anyone here has, would you please share with me how to create the connections, perform a query and then iterate over its results? I've been reading through the online documentation for this library at http://thaiopensource.org/devprojects/libpqxx/doc/2.6.8/html/Reference/ and I

[GENERAL] ERROR: could not access status of transaction

2006-12-25 Thread Stuart Grimshaw
berble=# select * from headlines ; ERROR: could not access status of transaction 1668180339 DETAIL: could not open file "pg_clog/0636": No such file or directory Using Postgres 8.1.5 from Debian unstable, I got the above error, and I have no idea what it means? -- -S Sports Photography in Sou

Re: [GENERAL] psql "SCHEMA" switch

2006-12-25 Thread Shoaib Mir
In your SQL script file you can add at the start something like this: set search_path = contrib and that should take care of it without this change in psql. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/23/06, Paul Silveira <[EMAIL PROTECTED]> wrote: I was trying

Re: [GENERAL] Problem with large table not using indexes (I think)

2006-12-25 Thread Benjamin Arai
One more note about my problem, when you run a query on older data in the table then it work great but if you query newer data then is very slow. Ex. SELECT * from my_table WHERE date >=12/1/2005 and date <= 12/1/2006; <- slow SELECT * from my_table WHERE date >=12/1/2002 and date <= 12/1/200

[GENERAL] Does pgsql's regex processor optimize Common-Prefix?

2006-12-25 Thread Kurapica
Hi all. I am developing an application which searches for city names in a column. There is a lot of cities and I have to 'like' every name which is not effective enough. So I want to know whether pgsql's regex processor can optimize regexes such as: Nebraska|Nevada|North Carolina to N(e(braska|va

[GENERAL] I NEED A HACKER TO WORK WITH AS A PARTNER FOR A BIG DEAL

2006-12-25 Thread bay123
I NEED A HACKER TO WORK WITH AS A PARTNER ASI AM CAPABLE OF PROVIDING DROPS ACCOUNT FOR THE HACKER WHOM WILL PROVIDE LOGINS AND ALSO TRANSFER FUNDS INTO THE DROP ACCOUNT I PROVIDE. THE SHARING MODE IS 50-50. THANKS, RICHARD -- View this message in context: http://www.nabble.com/I-NEED-A-HACKE

[GENERAL] seeking for suggestions - sporadic performance degradation

2006-12-25 Thread Vlad
Hello, I'm seeking for suggestions on diagnosing the problem. We have a relatively complex tables structure. When running a reporting query (60k+ in size) that includes inner/outers joins of several tables, sub-selects and group by, I often observe postgresql ( 8.1.5) would almost stop working on

[GENERAL] NEED URGENT HELP....

2006-12-25 Thread Sandip G
I am using PostgreSql 8.1 with pgAdmin III. OS is XP. this is my function: CREATE OR REPLACE FUNCTION sp_get_phase(character varying, character varying, character varying) RETURNS ret_dv_sp_get_phase AS $BODY$ SELECT BOOK_NO, USER_ID, COMPANY_ID, PHASE, UPDATE_USER_ID, UPDATE_DATE

Re: [GENERAL] Has anyone used the libpqxx C++ API for PostgreSQL

2006-12-25 Thread Sandeep Kumar Jakkaraju
Hi There are several Example C++ programs which comes with libpqxx ... just go through them for creating connection/transaction etc If you have struct member alignment problem ... please go through my blog .. http://jakkarajus.blogspot.com On 21 Dec 2006 10:01:22 -0800, [EMAIL PROTECTED]

Re: [GENERAL] NEED URGENT HELP....

2006-12-25 Thread Harpreet Dhaliwal
select * from sp_get_phase ('sandip', 'oms', '1,4') this return a Blank record it would match ur query against '1,4' for the corressponding field in the table. do u really have one such value for that field in your table, i mean '1,4' ?? it won't search for 1 and 4 separately if that is what you

Re: [GENERAL] NEED URGENT HELP....

2006-12-25 Thread Guy Rouillier
Sandip G wrote: > WHERE (USER_ID = $1) AND (COMPANY_ID = $2) AND BOOK_NO IN ($3) > select * from sp_get_phase ('sandip', 'oms', '1,4') this return a > Blank record. $3 is a parameter marker for a single value. You cannot supply a comma-separated list of values and expect it

Re: [GENERAL] Need some Technical support !!!

2006-12-25 Thread Guy Rouillier
Mohan Kumar Thangaraj wrote: Hi, I have a UML diagram and which contains DataBase Design. The tables and columns can contain some relationship. this all in "ALLFusion ERwin Data Modeler" the file is saved as ".erwin". I want to use the PostgreSQL DataBase, so i want save all the Tables and c

Re: [GENERAL] NEED URGENT HELP....

2006-12-25 Thread Henrique P Machado
WHERE (USER_ID = $1) AND (COMPANY_ID = $2) AND BOOK_NO IN ($3) Could'nt he use an array in this 3rd parameter? -- ZehRique

Re: [GENERAL] table locks

2006-12-25 Thread Ilja Golshtein
>But seriously, why block autovacuum? It no visible effect on the table. I DO NOT want to block autovacuum. I need lock modes do not interfere with anything else just to use in my application. user_locks is fine, while it does not provide waiting (only immediate Yes or No). >Why do you want to

Re: [GENERAL] table locks

2006-12-25 Thread Tom Lane
"Ilja Golshtein" <[EMAIL PROTECTED]> writes: >> Why do you want to lock at all? > It's long and sad story ;( If you don't explain what you're trying to accomplish, you're unlikely to get useful advice. regards, tom lane ---(end of broadcast)-

Re: [GENERAL] table locks

2006-12-25 Thread Ilja Golshtein
>>> Why do you want to lock at all? > >> It's long and sad story ;( > >If you don't explain what you're trying to accomplish, you're unlikely >to get useful advice. Tom, I need table level locks for cooperative usage in my application. LOCK TABLE table_name in EXCLUSIVE MODE and LOCK TABLE tabl