Re: Stored Procedure Record Updates using For Loops - Postgres 8.1

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: "Lummis, Patrick J" <PJL(at)dolby(dot)com>, "Bartosz Dmytrak" <bdmytrak(at)eranet(dot)pl>
Subject: Re: Stored Procedure Record Updates using For Loops - Postgres 8.1
Date: 2012-02-28 20:47:41
Message-ID: 201202281247.41643.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, February 28, 2012 12:35:58 pm Lummis, Patrick J wrote:
> Hi Bartek,
>
> Thanks for the quick response.
>
> Syntax error cleared up and loads fine but executing the stored
> procedure fails to update the row.

From the usage I guessing this function is not being used in a trigger. As such
the ROW variable exists outside the table. If you want to UPDATE the table you
are going to have to do a hybrid of what you have:

update workorder set wfstatus='failed' where id=workorderRecord.id

assuming there is an 'id' field of some sort.

>
> Regards,
>
> Patrick

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2012-02-28 20:48:35 Re: Error installing plpythonu in 9.1
Previous Message Bartosz Dmytrak 2012-02-28 20:46:49 Re: Stored Procedure Record Updates using For Loops - Postgres 8.1