Thread: PARAMETERS IN QUERIES

PARAMETERS IN QUERIES

From
JORGE MALDONADO
Date:
Where can I find information about how to use parameters in queries? For example, to define parameters in the WHERE clause to build dynamic SELECT's.
 
I have searched the documentation manual but I cannot find this specific topic.
 
Thanks in advance.
Jorge Maldonado

Re: PARAMETERS IN QUERIES

From
Sean Davis
Date:


On Mon, Feb 23, 2009 at 5:56 PM, JORGE MALDONADO <jorgemal1960@gmail.com> wrote:
Where can I find information about how to use parameters in queries? For example, to define parameters in the WHERE clause to build dynamic SELECT's.
 
I have searched the documentation manual but I cannot find this specific topic.
 

What interface are you using to construct the queries?  Or are you talking about pl/pgsql?  Can you clarify what you are trying to do?

Sean
 

Re: PARAMETERS IN QUERIES

From
Rafael Domiciano
Date:
I Think that he's a talking about that Oracle like Query:
BEGIN;
A = 1;
select * from test where id = a;
a := a + 1;
select * from test where id = a;
COMMIT;

The way to do it in Postgres is using function.

Rafael

On Mon, Feb 23, 2009 at 8:17 PM, Sean Davis <sdavis2@mail.nih.gov> wrote:


On Mon, Feb 23, 2009 at 5:56 PM, JORGE MALDONADO <jorgemal1960@gmail.com> wrote:
Where can I find information about how to use parameters in queries? For example, to define parameters in the WHERE clause to build dynamic SELECT's.
 
I have searched the documentation manual but I cannot find this specific topic.
 

What interface are you using to construct the queries?  Or are you talking about pl/pgsql?  Can you clarify what you are trying to do?

Sean