Received: from vaccine.rki.de (firewall-user@vaccine.rki.de [193.175.81.250]) by hub.org (8.10.1/8.10.1) with SMTP id e856QPC96607 for ; Tue, 5 Sep 2000 02:26:26 -0400 (EDT) Received: by vaccine.rki.de; id IAA08842; Tue, 5 Sep 2000 08:26:20 +0200 Received: from unknown(10.15.130.13) by vaccine.rki.de via smap (V5.5) id xma008840; Tue, 5 Sep 00 08:26:15 +0200 Received: from wr-linux02.rki.de ([10.15.140.59]) by mailnu01.rki.de with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id QD4NBWD4; Tue, 5 Sep 2000 08:25:11 +0200 Date: Tue, 5 Sep 2000 08:26:06 +0200 (CEST) From: Andreas Tille cc: PostgreSQL SQL Subject: Re: Order by in stored functions In-Reply-To: <14161.968083838@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200009/18 On Mon, 4 Sep 2000, Tom Lane wrote: > This is a bug that has already been fixed in current sources: the check > that makes sure your select produces only one varchar column is > mistakenly counting the hidden IdSort column that's needed to sort by. Is there any patch against 7.0.2 sources which might help me (or the Debian package maintainer out? > I don't know of any good workaround in 7.0, short of patching the > erroneous code. Have you thought about using a view, rather than a > function returning set? I could try that. Is there any general advise for more or less beginners like me regarding when to use views and when to use functions? Kind regards Andreas.