From: stevew <stevew@bigeric.force9.co.uk>
To: 'postgres post' <pgsql-sql@postgresql.org>
Subject: function returning arrays?
Date: Sun, 6 Jun 1999 19:44:00 +0100
Message-ID: <171315903.9662403.90@erica> (raw)
Hi there,
Can a function return an array?
I tried:
create function my_func() returns int4[] as
'select a_value from a_table where b_value = 1;'
language 'sql';
The parser don't like int4[]
What about a function returning an array of instances, is this possible?
create function my_func(a_value) returns my_table[] as
'select * from my_table where <a clause including the passed arg> ;'
language 'sql';
Though I guess this is probably best done with a view?
Any comments appreciated.
Steve W
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: stevew@bigeric.force9.co.uk
Subject: Re: function returning arrays?
In-Reply-To: <171315903.9662403.90@erica>
References: <171315903.9662403.90@erica>
* 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