Re: [GENERAL] Return Single Row Result After Inserting (Stored Procedure)

2010-01-10 Thread Yan Cheng Cheok
n, 1/11/10, Adrian Klaver wrote: > From: Adrian Klaver > Subject: Re: [GENERAL] Return Single Row Result After Inserting (Stored > Procedure) > To: pgsql-general@postgresql.org > Cc: "Yan Cheng Cheok" , t...@sss.pgh.pa.us > Date: Monday, January 11, 2010, 11:03 AM > O

Re: [GENERAL] Return Single Row Result After Inserting (Stored Procedure)

2010-01-10 Thread Adrian Klaver
On Sunday 10 January 2010 5:49:38 pm Yan Cheng Cheok wrote: > Thanks! > > However, we prefer to stick with plpgsql, as rest of our functions are in > that language. We need some consistency. > > I try to modify my previous stored procedure to. > > CREATE OR REPLACE FUNCTION create_lot(text, text, t

Re: [GENERAL] Return Single Row Result After Inserting (Stored Procedure)

2010-01-10 Thread Yan Cheng Cheok
Thanks! However, we prefer to stick with plpgsql, as rest of our functions are in that language. We need some consistency. I try to modify my previous stored procedure to. CREATE OR REPLACE FUNCTION create_lot(text, text, text) RETURNS lot AS $BODY$DECLARE configurationFile ALIAS FOR $1

Re: [GENERAL] Return Single Row Result After Inserting (Stored Procedure)

2010-01-08 Thread A. Kretschmer
In response to Yan Cheng Cheok : > Hello all, > > I have the following procedure. I wish it will return a single row > result to caller, after I insert the value (as the row contains > several auto generated fields), without perform additional SELECT > query. > > According to > http://wischner.bl

[GENERAL] Return Single Row Result After Inserting (Stored Procedure)

2010-01-07 Thread Yan Cheng Cheok
Hello all, I have the following procedure. I wish it will return a single row result to caller, after I insert the value (as the row contains several auto generated fields), without perform additional SELECT query. According to http://wischner.blogspot.com/2009/03/creating-stored-procedure-fun