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