Re: ORDER BY with plpgsql parameter

From: "Lee Harr" <missive(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ORDER BY with plpgsql parameter
Date: 2004-06-01 21:09:43
Message-ID: BAY2-F26Nj4058ouEJL00001afc@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>is it possible to use a parameter of a plpgsql-function to order a
>selection
>inside the function?

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 ...

http://www.postgresql.org/docs/7.4/static/plpgsql-control-structures.html
( it is the very last thing on that page )

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

Browse pgsql-general by date

  From Date Subject
Next Message Tanya Mamedalin 2004-06-01 21:28:17 Inet performance
Previous Message Duane Lee - EGOVX 2004-06-01 21:03:40 Trigger & Function