Re: Multiple return values and assignment - Mailing list pgsql-sql

From Leif B. Kristensen
Subject Re: Multiple return values and assignment
Date
Msg-id 200904272137.47709.leif@solumslekt.org
Whole thread Raw
In response to Re: Multiple return values and assignment  (Jasen Betts <jasen@xnet.co.nz>)
List pgsql-sql
On Monday 27. April 2009, Jasen Betts wrote:

>SELECT * FROM get_sort(par_id, srt, txt) INTO srt,txt;

Thank you very much! That saved me from one composite variable 
declaration and two superfluous lines of code. I've settled for

SELECT number, string FROM get_sort(par_id, srt, txt) INTO srt, txt;

as that seems a little tidier.

I probably should have thought of it myself, but I wrongly assumed that 
it was impossible to do multiple assignments like this in plpgsql.
-- 
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/


pgsql-sql by date:

Previous
From: Andy Shellam
Date:
Subject: Storing null bytes in bytea
Next
From: Tom Lane
Date:
Subject: Re: Storing null bytes in bytea