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] 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