Re: ORDER BY with plpgsql parameter

From: Thomas Schoen <t(dot)schoen(at)vitrado(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ORDER BY with plpgsql parameter
Date: 2004-06-02 08:36:47
Message-ID: 200406021036.47032.t.schoen@vitrado.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You need to use the FOR-IN-EXECUTE style of query. That way
> you can use any string you want (including text passed in as
> a parameter) to build the query inside the function ...

that is what i want to avoid. (i wrote that in my first mail)
My question was about why it is not possible to do it like this:
....ORDER BY $1
I don't know if it is standards-conform or if someone considers it a usefull
feature, but i think it would help users to write capsulated
statistics-functions or simply browsable and orderable lists.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-06-02 09:17:52 Re: ORDER BY with plpgsql parameter
Previous Message Richard Huxton 2004-06-02 08:28:52 Re: Providing the password to psql from a script