stored procs in postgresql

From: ceremona(at)gmail(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: stored procs in postgresql
Date: 2005-09-24 19:30:58
Message-ID: op.sxmghwnc1qrx7c@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,

I have been having some trouble with plsql stored procs in postgres in
that I can
make a table name a variable in the stored proc. Is there some special
way to make this happen that I am unaware of?

For example, I want to do something like:

stored_proc(integer,varchar)

SELECT table_name.id
FROM table_name $2
WHERE table_name.id=$1

but I get an error about the $2 argument being no good.

Does anyone know how I can deal with this?

Thanks,
Cere

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Browne 2005-09-24 21:27:19 Re: stored procs in postgresql
Previous Message Aldor 2005-09-24 11:28:45 Re: VACUUM FULL vs dump & restore