This is not really possible with postgresql at the moment. Better off trying to work around, perhaps using a view. That way you have a way to change the select statement without actually modifying your client code. Keith. At 06:09 PM 22/09/2000 -0400, Nelson wrote: >thank you jie Liang for your response, but my problems are: >1. How to store a query in the database. >2. How to give a parameter from outside of database, for example: >select * from table1 where row1 = my_parameter_outside. >Give me an example please. > >