Skip site navigation (1) Skip section navigation (2)

Re: PARAMETERS IN QUERIES

From: Rafael Domiciano <rafael(dot)domiciano(at)gmail(dot)com>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: PARAMETERS IN QUERIES
Date: 2009-02-23 23:37:02
Message-ID: 3a0028490902231537laa10016y2253f7a43e7e0a5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
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(at)mail(dot)nih(dot)gov> wrote:

>
>
> On Mon, Feb 23, 2009 at 5:56 PM, JORGE MALDONADO <jorgemal1960(at)gmail(dot)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
>
>
>

In response to

pgsql-novice by date

Next:From: Nico CallewaertDate: 2009-02-24 12:25:11
Subject: FUNCTION question
Previous:From: Sean DavisDate: 2009-02-23 23:17:41
Subject: Re: PARAMETERS IN QUERIES

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group