Received: from merlins.force9.net (merlins.force9.net [195.166.128.23]) by hub.org (8.9.3/8.9.3) with SMTP id PAA49007 for ; Sun, 6 Jun 1999 15:31:20 -0400 (EDT) (envelope-from stevew@bigeric.force9.co.uk) Received: (qmail 28284 invoked from network); 6 Jun 1999 19:34:56 -0000 Received: from mayfly.plus.net.uk (HELO mayfly.force9.net) (195.166.128.28) by merlins.force9.net with SMTP; 6 Jun 1999 19:34:56 -0000 Received: (qmail 6311 invoked from network); 6 Jun 1999 19:36:27 -0000 Received: from 227.hiper03.shef.dialup.force9.net (HELO erica) (195.166.146.227) by mayfly.plus.net.uk with SMTP; 6 Jun 1999 19:36:27 -0000 Received: by erica with MailBeamer v3.20 (WinNT 4.x Service) ; Sun, 6 Jun 1999 19:45:03 +0100 From: stevew To: "'postgres post'" Subject: function returning arrays? Date: Sun, 6 Jun 1999 19:44:00 +0100 X-Mailer: MailBeamer v3.20 (WinNT 4.x Service) Message-ID: <171315903.9662403.90@erica> X-Priority: 3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ;' language 'sql'; Though I guess this is probably best done with a view? Any comments appreciated. Steve W