pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
Cc: pgsql-sql@postgresql.org
Subject: returning a record from PL/pgSQL
Date: Fri, 21 Jan 2005 12:41:09 +0100
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at> (raw)
I just tried hard to return
a single record fromout a plpgsql-function. While the (otherwise excelent)
documentation didn't give me an answer, I found out that this works:
select into ret false, balance, balance;
return ret;
while ret is a composite type.
This construction however tastes not good to me. Is there a nicer way?
An example for PL/pgSQL which returns not just a scalar but also a composite
type should be added to the documentation. i.e. as second part of the RETURN
statement.
view thread (2+ messages) latest in thread
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at> Permalink: ../ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at/ Also on: postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at ·
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: robert.koepferl@sonorys.at Subject: Re: returning a record from PL/pgSQL In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at> References: <ED4E30DD9C43D5118DFB00508BBBA76EB1657C@neptun.sonorys.at> * 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