Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f94L4Yn73159 for ; Thu, 4 Oct 2001 17:04:34 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f94KZ2C76706 for pgsql-sql@postgresql.org; Thu, 4 Oct 2001 16:35:02 -0400 (EDT) (envelope-from news) From: Allan Engelhardt X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Function return rows? Date: Thu, 04 Oct 2001 21:33:02 +0100 Organization: http://cybaea.com/ Message-ID: <3BBCC77E.9451206D@cybaea.com> References: <9p4s81$19q9$1@news.tht.net> X-NNTP-Posting-Host: engelhardt.demon.co.uk:193.237.12.86 X-Complaints-To: abuse@demon.net X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.7 i686) X-Accept-Language: en MIME-Version: 1.0 To: Pat M Content-Type: text/plain; charset=iso-8859-1 Lines: 9 To: pgsql-sql@postgresql.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by postgresql.org id f94L4Yn73160 X-Archive-Number: 200110/66 X-Sequence-Number: 5021 Pat M wrote: > Can I use a function to execute a query and return a row or set of rows? No. Consider using temporary tables if you must do this. > If > so, can you point me to some examples or perhaps give me an example of a > function that would do roughly the same thing as: > > select * from mytable where mytable.name ~* 'aname'; > > I can't seem to find any examples that return rows, just single ints and > bools and stuff.