From: | NRonayette <r97m10(at)socotec(dot)fr> |
---|---|
To: | "'jprem'" <jprem(at)srmsoft(dot)co(dot)in>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: to pass a parameter |
Date: | 2000-06-09 17:03:25 |
Message-ID: | 3941235D.CECBB771@socotec.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sorry, but i made a mistake here !
the function dept or is equivalente coud not solve this problem (pass a
table name as a parameter)
In Oracle exist Dynamic SQL, is there something like that in postgres ?
Is it possible to execute a query built in a plpgsql function or do we
need to use Perl and the Pg module for exemple ?
Nicolas.
NRonayette wrote:
> (i copy/paste)
> Parameters
>
> A parameter is used to indicate a parameter in a SQL function. Typically
> this is used in SQL function definition statement. The
> form of a parameter is:
>
> $number
>
> For example, consider the definition of a function, dept, as
>
> CREATE FUNCTION dept (name)
> RETURNS dept
> AS 'select * from
> dept where name=$1'
> LANGUAGE 'sql';
>
> (i guess there's something more simple)
> Nicolas
>
> >
> > >> -----Original Message-----
> > >> From: jprem [mailto:jprem(at)srmsoft(dot)co(dot)in]
> > >> Sent: 09 June 2000 07:39
> > >> To: pgsql-general(at)postgresql(dot)org
> > >> Subject: [GENERAL] to pass a parameter
> > >>
> > >>
> > >> hello,
> > >> how can i pass a table name dynamically to a query ?
> > >>
> > >> in oracle we do
> > >> select * from &x
> > >>
> > >> how is it here ?
> > >> please help.
> > >>
> > >>
> > >>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-06-09 17:49:53 | Re: Cannot INDEX an Access97 ODBC |
Previous Message | Ron Peterson | 2000-06-09 15:50:52 | Re: Re: PHP and inet data type |