Re: [SQL] Multiple return values and assignment

2009-04-27 Thread Leif B. Kristensen
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

Re: [SQL] Multiple return values and assignment

2009-04-27 Thread Jasen Betts
On 2009-04-25, Leif B. Kristensen wrote: > I've got a function that returns both an integer and a string as a > user-defined composite type int_text: > > -- CREATE TYPE int_text AS (number INTEGER, string TEXT); > > Basically, the function does some heuristics to extract a sort order > number fr

[SQL] Multiple return values and assignment

2009-04-25 Thread Leif B. Kristensen
I've got a function that returns both an integer and a string as a user-defined composite type int_text: -- CREATE TYPE int_text AS (number INTEGER, string TEXT); Basically, the function does some heuristics to extract a sort order number from a text, and conditionally modify the text: CREATE