Thread: SELECT INTO behavior in SQL functions

SELECT INTO behavior in SQL functions

From
Fran Fabrizio
Date:
Do PostgreSQL SQL functions have any behavior similar to SQL92 SELECT
INTO so that I can have variables to use later in the function?  This
function deletes one or more rows and updates the rest of the rows in
the table, but the updates require some of the data from the deleted
rows.  I was going to try SELECT foo, bar INTO myfoo, mybar .... until I
noticed in the docs that PostgreSQL overrides this behavior.  Does it
provide any alternates, or do I need to just go ahead and write a
plpgsql function instead?

-Fran