Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5CH9IE58416 for ; Tue, 12 Jun 2001 13:09:18 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id NAA03000; Tue, 12 Jun 2001 13:15:27 -0400 (EDT) Date: Tue, 12 Jun 2001 13:15:27 -0400 (EDT) From: Alex Pilosov To: Andrzej Roszkowski cc: pgsql-sql@postgresql.org Subject: Re: PL/PGSQL In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/184 X-Sequence-Number: 3429 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 > >