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 17:58:50
Message-ID: 200406021958.50911.t.schoen@vitrado.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you all for your detailed answers!

My conclusion is:
- Use "FOR IN EXECUTE" if you want to sort by many different columns depending
on the function paramaters.
- Use "IF" and a seperate SQL-statement for every sort-column provided by the
function parameter if you only want to sort by a few different columns and
want to optimize the performance of your function.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-06-02 18:48:20 Re: GRANT question
Previous Message Cyril VELTER 2004-06-02 17:35:39 [Re] Re: Dump 7.1.3->7.4.2