pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Pilosov <alex@pilosoft.com>
To: Andrzej Roszkowski <thomas@polcard.com.pl>
Cc: pgsql-sql@postgresql.org
Subject: Re: PL/PGSQL
Date: Tue, 12 Jun 2001 13:15:27 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106121313360.9902-100000@spider.pilosoft.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0106050815130.12363-100000@thomas.polcard.com.pl>

You _can_ return a tuple by doing this:
create table foo(x int, y text);

create function bar() returns foo as '
...
';

The only thing is, you can't do much with such a function (currently), you
can only call it from a different function, and then break the result up:

foo v=bar();
do_something(v.x);
do_something(v.y);

-alex

On Tue, 5 Jun 2001, Andrzej Roszkowski wrote:

> Hi!
> I can't find any info about possible data types that can be returned from
> procedure. I want to return tuple. When I use OPAQUE as a return type I
> get error message that OPAQUE can be only returned from trigger. It is
> possible to do this without triggers?
> 
> ------------------------------------------------------------------------
> Code reviews are like sex, just anyone can do it, but skill and training
> can make you a lot better at it." - LJ 
> Thomas
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 
> 




view thread (13+ messages)  latest in thread

Message-ID: <Pine.BSO.4.10.10106121313360.9902-100000@spider.pilosoft.com>
Permalink:  ../Pine.BSO.4.10.10106121313360.9902-100000@spider.pilosoft.com/
Also on:    postgresql.org/message-id/Pine.BSO.4.10.10106121313360.9902-100000@spider.pilosoft.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alex@pilosoft.com, thomas@polcard.com.pl
  Subject: Re: PL/PGSQL
  In-Reply-To: <Pine.BSO.4.10.10106121313360.9902-100000@spider.pilosoft.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