Re: pgplsql SELECT INTO ... FOR UPDATE

Поиск
Список
Период
Сортировка
От Ragnar Hafstað
Тема Re: pgplsql SELECT INTO ... FOR UPDATE
Дата
Msg-id 1103114093.4086.4.camel@localhost.localdomain
обсуждение исходный текст
Ответ на pgplsql SELECT INTO ... FOR UPDATE (transaction/locking question)  (Eric Brown <eric.brown@propel.com>)
Список pgsql-general
On Wed, 2004-12-15 at 01:38 -0800, Eric Brown wrote:
>
>
> ______________________________________________________________________
>
> I'm trying to write a stored procedure in plpgsql that selects a row
> and possibly increments one of its fields. I thought I would do SELECT
> INTO my_record * FROM my_table FOR UPDATE WHERE ..., but apparently
> plpgsql doesn't like the FOR UPDATE in a stored procedure.

the docs seem to imply that the FOR UPDATE clause should follow the
WHERE clause.
and indeed, it would seem that your should follow the '*'
try
SELECT * INTO my_record WHERE ... FOR UPDATE

gnari



В списке pgsql-general по дате отправления:

Предыдущее
От: Daniel Martini
Дата:
Сообщение: Re: Connect to Postgres 7.4 via ODBC
Следующее
От: "Berend Tober"
Дата:
Сообщение: Re: pgplsql SELECT INTO ... FOR UPDATE