Hi,
So, your question is not client side,
you want store a procedure in db(server side) can accept para from client side.
I have not seen Pg has a functionality to do like store procedure or package like Oracle
( maybe I don't know), so , I suggest that :
1 use embeded SQL
2. store query as a SQL in shell script( because shell script can accept parameters)
    in shell , you can say:
    echo "select * from table1 where row1=$1"|rsh pg_server /usr/local/pgsql/bin/psql -U robt db
    (e.g . remote shell call, local is same)
3. if you use bash shell, you can also use pgbash(http://www.psn.co.jp/PostgreSQL/pgbash/index-e.html)

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

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

[EMAIL PROTECTED]
www.ipinc.com
 

Reply via email to