Dynamic expressions set in "order by" clause

From: "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Dynamic expressions set in "order by" clause
Date: 2007-11-21 15:48:08
Message-ID: c3a7de1f0711210748y56ca96f6sfec783b09e0ba230@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a procedure which takes few arguments. The arguments must
affect expressions set of "order by" clause. For instance in one case
ordering must be performed by 1st, 2nd (desc) and 3rd fields but in
another by 3rd, 1st and 2nd fields.

Is there a way to manage it without using dynamic queries (execute
'...') and code duplicating?

--
Regards,
Sergey Konoplev

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2007-11-21 15:50:03 Re: loading a funtion script from a file
Previous Message Rodrigo De León 2007-11-21 15:41:03 Re: Table filter