Re: question about PL/pgSQL function

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: datactrl <quals(at)bigfoot(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: question about PL/pgSQL function
Date: 2001-06-01 19:29:13
Message-ID: 200106011929.f51JTDI02531@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus wrote:
> Jack,
>
> > select into rec1 * from EMP where empNo =''xxxx'';
> > i1 := xxx(rec1,5);
>
> Bad syntax. The correct syntax is:
>
> SELECT * INTO rec1 FROM EMP WHERE empNo=''xxxx'';
>
> > 2. Is that possible to return a record from a function? And how do I
> > get the
> > returned record in PL/pgSql
>
> No, it is not possible. I know the list archives are kinda hard to
> search, but we've discussed this question ad naseum; in fact, I just
> provided a workaround earlier this week.

Not yet. In the current 7.2 development tree it's possible to
return a cursor opened inside of the procedure. Maybe I can
even improve it so you can open an empty cursor and *fill* it
like a tuple sink so to speak. Mainly depends on if and how
we want to improve the capabilities of portals.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Roberto Mello 2001-06-01 21:53:31 Re: PGAccess/pgplsql Blues
Previous Message Jeff Barrett 2001-06-01 19:09:33 seleting all dates between two dates