Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Klint Gore
Dale Harris wrote: As per the original message: >I've got some code which postgres 8.3.3 won't accept. Postgres doesn't like the INTO clause on RETURNING INTO and I've tried following the documentation. > >UPDATE "EntityRelation" SET "Status" = inStatus, "Modified" = Session_TimeStamp(),

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Scott Marlowe
On Tue, Aug 19, 2008 at 9:51 PM, Dale Harris <[EMAIL PROTECTED]> wrote: > As per the original message: >>UPDATE "EntityRelation" SET "Status" = inStatus, "Modified" = >> Session_TimeStamp(), "ModifiedBy" = UserID() WHERE ("RelationID" = >> inRelationID) AND ("EntityID" = inEnityID) AND IsEqual(inR

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Dale Harris
PROTECTED] Sent: Wednesday, 20 August 2008 12:47 To: Dale Harris Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully Dale Harris wrote: > It works for the INSERT command, but not UPDATE. For the INSERT command, it >

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Klint Gore
Dale Harris wrote: It works for the INSERT command, but not UPDATE. For the INSERT command, it makes my code look neater and I image it's more efficient too. This time I am trying to UPDATE a field using a primary key, and return another field into a variable so that I can take necessary action

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Tom Lane
"Dale Harris" <[EMAIL PROTECTED]> writes: > In the following documentation it advises that the UPDATE statement should > be able to return a value into a variable in plpgsql. > http://www.postgresql.org/docs/8.3/static/plpgsql-statements.html > It works for the INSERT command, but not UPDATE. As w

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-19 Thread Dale Harris
Hi All, In the following documentation it advises that the UPDATE statement should be able to return a value into a variable in plpgsql. http://www.postgresql.org/docs/8.3/static/plpgsql-statements.html It works for the INSERT command, but not UPDATE. For the INSERT command, it makes my code lo

[GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-18 Thread Dale
Hi, I've got some code which postgres 8.3.3 won't accept. Postgres doesn't like the INTO clause on RETURNING INTO and I've tried following the documentation. UPDATE "EntityRelation" SET "Status" = inStatus, "Modified" = Session_TimeStamp(), "ModifiedBy" = UserID() WHERE ("RelationID" = inRelation

Re: [GENERAL] can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-18 Thread Lew
Dale wrote: Hi, I've got some code which postgres 8.3.3 won't accept. Postgres doesn't like the INTO clause on RETURNING INTO and I've tried following the documentation. UPDATE "EntityRelation" SET "Status" = inStatus, "Modified" = Session_TimeStamp(), "ModifiedBy" = UserID() WHERE ("RelationID