Re: Order by in stored functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Tille <tillea(at)rki(dot)de>
Cc: PostgreSQL SQL <pgsql-sql(at)hub(dot)org>
Subject: Re: Order by in stored functions
Date: 2000-09-04 16:10:38
Message-ID: 14161.968083838@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Andreas Tille <tillea(at)rki(dot)de> writes:
> I've got the following error message:
> ERROR: function declared to return varchar returns multiple values in
> final retrieve

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.

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?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Craig May 2000-09-04 17:15:44 pg_hba.conf
Previous Message Ice Planet 2000-09-04 12:15:53 drop sequence in transaction