Re: ORDER BY with plpgsql parameter - Mailing list pgsql-general

From Lee Harr
Subject Re: ORDER BY with plpgsql parameter
Date
Msg-id BAY2-F26Nj4058ouEJL00001afc@hotmail.com
Whole thread Raw
In response to ORDER BY with plpgsql parameter  (Thomas Schoen <t.schoen@vitrado.de>)
List 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


pgsql-general by date:

Previous
From: Duane Lee - EGOVX
Date:
Subject: Trigger & Function
Next
From: Mike Nolan
Date:
Subject: Re: [PERFORM] Trigger & Function