Re: [GENERAL] Asynchronous queries - processing listen (notify) in a procedural language

2010-02-20 Thread Pavel Stehule
Hello look on orafce http://www.postgres.cz/index.php/Oracle_functionality_%28en%29 Regards Pavel Stehule 2010/2/21 Petr Chmelar : > Hi there, > > I'd like to make a real-time enabled database and I need to process data > asynchronously. Usually, there are many quick inserts sometimes causing

[GENERAL] Asynchronous queries - processing listen (notify) in a procedural language

2010-02-20 Thread Petr Chmelar
Hi there, I'd like to make a real-time enabled database and I need to process data asynchronously. Usually, there are many quick inserts sometimes causing vast updates. I can't use triggers and rules because the transactions are really long when there is the update (upgrade) needed. Is there a w

[GENERAL] How to count the number of items in an Array?

2010-02-20 Thread Andre Lopes
Hi, I have googled, but I can't find how to count the number of items in an Array in Plpgsql. Someone can give me a clue on that? Best Regads,

Re: [GENERAL] PostgreSQL fails to start

2010-02-20 Thread Reid Thompson
On 2/20/2010 4:42 PM, John Gage wrote: I have had the same/similar problem on a Mac. Postgres creates a user "postgres" and the only way that user can see files is for them to exist outside of any other particular user's home directory. I placed the files in the root directory!? I would like, I

Re: [GENERAL] PostgreSQL fails to start

2010-02-20 Thread Reid Thompson
On 2/20/2010 4:42 PM, John Gage wrote: I have had the same/similar problem on a Mac. Postgres creates a user "postgres" and the only way that user can see files is for them to exist outside of any other particular user's home directory. I placed the files in the root directory!? I would like, I

Re: [GENERAL] PostgreSQL fails to start

2010-02-20 Thread John Gage
I have had the same/similar problem on a Mac. Postgres creates a user "postgres" and the only way that user can see files is for them to exist outside of any other particular user's home directory. I placed the files in the root directory!? I would like, I think, to give "postgres" privi

Re: [GENERAL] PostgreSQL fails to start

2010-02-20 Thread Massa, Harald Armin
Eddie, > It also seems to show a weakness in PostgreSQL's logging, in that (a) it > would help a lot if it just printed its error to stderr, and (b) the log > message it did send to the event log was of the form "directory not found" > rather than "permission denied". > problem for sending to st

Re: [GENERAL] PostgreSQL fails to start

2010-02-20 Thread Heddon's Gate Hotel
Thanks very much for the tip, Ray - it has led me to discover the Windows Event Viewer, which I did not even know existed. It was a sort of help, because it enabled me - eventually - to diagnose that the problem was to do with directory permissions. I had installed PostgreSQL with its data di

Re: [GENERAL] Transactions, How to?

2010-02-20 Thread Andre Lopes
Tkanks for the reply. Best Regards, On Sat, Feb 20, 2010 at 5:34 PM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Andre Lopes wrote: > > > > > But I can't complite if I add to the procedure a BEGIN and a COMMIT. I > think > > this BEGIN and COMMIT will make a real transaction or I

Re: [GENERAL] Transactions, How to?

2010-02-20 Thread Andreas Kretschmer
Andre Lopes wrote: > > But I can't complite if I add to the procedure a BEGIN and a COMMIT. I think > this BEGIN and COMMIT will make a real transaction or I'am wrong? Right, you are wrong ;-) A function is atomic, you don't need a begin/commit inside. Andreas -- Really, I'm not out to des

[GENERAL] Transactions, How to?

2010-02-20 Thread Andre Lopes
Hi, I need to do a procedure that does an INSERT and an UPDATE. The procedure works in this way: [quote] CREATE OR REPLACE FUNCTION "public"."apr_insert_newsletter_distritos" ("pSTRING_ARRAY" varchar, "pEMAIL" varchar, "pITEMS" integer, "pID_WEBSITE_RECOLHA" varchar) RETURNS void AS $body$ DECLA

Re: [GENERAL] Procedures

2010-02-20 Thread Raymond O'Donnell
On 20/02/2010 13:54, Nilesh Govindarajan wrote: > > Ah perfect ! problem solved. Thanks ! > Glad it was that easy! You ought to read up on set-returning functions in the docs: http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING See the secti

Re: [GENERAL] DDL trigger kind functionality in PostGreSQL

2010-02-20 Thread Greg Stark
On Thu, Feb 18, 2010 at 4:55 AM, dipti shah wrote: > Hi, > > I was looking for SQL DDL trigger kind of functionality in PostGreSQL but > couldn;t find any. There isn't any. > Basically I want to make sure that no users > should use "DROP" command directly on my database even though he/she owner

Re: [GENERAL] Procedures

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 07:12 PM, Raymond O'Donnell wrote: On 20/02/2010 13:28, Nilesh Govindarajan wrote: Okay here's my query - select c.cid, c.subject, n.title from comments c, node n where c.nid = n.nid and c.status != 0; This is the query to check list of comments requiring admin approval and also

Re: [GENERAL] Procedures

2010-02-20 Thread Thomas Kellerer
Nilesh Govindarajan wrote on 20.02.2010 14:28: Okay here's my query - select c.cid, c.subject, n.title from comments c, node n where c.nid = n.nid and c.status != 0; This is the query to check list of comments requiring admin approval and also the article titles on which this is posted. I want

Re: [GENERAL] Procedures

2010-02-20 Thread Raymond O'Donnell
On 20/02/2010 13:28, Nilesh Govindarajan wrote: > Okay here's my query - > > select c.cid, c.subject, n.title from comments c, node n where c.nid = > n.nid and c.status != 0; > > This is the query to check list of comments requiring admin approval and > also the article titles on which this is po

Re: [GENERAL] Procedures

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 06:54 PM, Raymond O'Donnell wrote: On 20/02/2010 13:08, Nilesh Govindarajan wrote: On 02/20/2010 02:32 PM, John R Pierce wrote: Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all d

Re: [GENERAL] Procedures

2010-02-20 Thread Raymond O'Donnell
On 20/02/2010 13:08, Nilesh Govindarajan wrote: > On 02/20/2010 02:32 PM, John R Pierce wrote: >> Nilesh Govindarajan wrote: >>> How do I create a procedure using plpgsql cursors to print the output >>> of the query in the cursor (using for loop) ? >>> >>> In all docs I found, it seems to be a must

Re: [GENERAL] Procedures

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 06:51 PM, Thomas Kellerer wrote: Nilesh Govindarajan wrote on 20.02.2010 14:08: On 02/20/2010 02:32 PM, John R Pierce wrote: Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs

Re: [GENERAL] Procedures

2010-02-20 Thread Thomas Kellerer
Nilesh Govindarajan wrote on 20.02.2010 14:08: On 02/20/2010 02:32 PM, John R Pierce wrote: Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs I found, it seems to be a must to return data t

Re: [GENERAL] Procedures

2010-02-20 Thread Nilesh Govindarajan
On 02/20/2010 02:32 PM, John R Pierce wrote: Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs I found, it seems to be a must to return data to the call which is not what I want. what is

Re: [GENERAL] Procedures

2010-02-20 Thread John R Pierce
Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs I found, it seems to be a must to return data to the call which is not what I want. what is it going to print it on? the postgres ser

[GENERAL] Procedures

2010-02-20 Thread Nilesh Govindarajan
How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs I found, it seems to be a must to return data to the call which is not what I want. -- Nilesh Govindarajan Site & Server Adminstrator www.itech7.com -- Sent via pgs