pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <JanWieck@Yahoo.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: datactrl <quals@bigfoot.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: question about PL/pgSQL function
Date: Fri, 1 Jun 2001 15:29:13 -0400 (EDT)
Message-ID: <200106011929.f51JTDI02531@jupiter.us.greatbridge.com> (raw)
In-Reply-To: <web-65766@davinci.ethosmedia.com>

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@Yahoo.com #



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




view thread (3+ messages)

Message-ID: <200106011929.f51JTDI02531@jupiter.us.greatbridge.com>
Permalink:  ../200106011929.f51JTDI02531@jupiter.us.greatbridge.com/
Also on:    postgresql.org/message-id/200106011929.f51JTDI02531@jupiter.us.greatbridge.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: JanWieck@Yahoo.com, josh@agliodbs.com, quals@bigfoot.com
  Subject: Re: question about PL/pgSQL function
  In-Reply-To: <200106011929.f51JTDI02531@jupiter.us.greatbridge.com>
  References: <web-65766@davinci.ethosmedia.com> <200106011929.f51JTDI02531@jupiter.us.greatbridge.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox