Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: PL/pgSQL 2
Date
Msg-id CAFj8pRBCnSbRV3HD8zvO6iR-Ad5fKcd-rFEjM3m5fRbPzKfqCg@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL 2  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: PL/pgSQL 2
List pgsql-hackers



2014-09-01 16:01 GMT+02:00 Craig Ringer <craig@2ndquadrant.com>:
On 09/01/2014 09:58 PM, Pavel Stehule wrote:
>
> It is in ToDo - allow parametrization for COMMANDs.
>
> But this is one point, when I am not sure if we would it. Now -
> situation is very simply. Variables should not be used as table or
> column name. With your proposal, the situation will by much more
> complex, and probably variables should be used in SELECT * FROM x; but
> it can be ambiguous SELECT x FROM table ... so maybe better to don't
> allow it

We would have to define a specific parameter marker, as used by things
like JDBC.

     SELECT x FROM ?tablename

     DROP TABLE ?tablename

or whatever your favourite place-holder syntax is.


It can be solution, but I dislike it .. It increase a language complexity .. vars with or without prefix .. and more,  hidden dynamic SQL

Nothing what I like  - I have a mental barrier to this concept.

Pavel



 

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PL/pgSQL 2
Next
From: Andres Freund
Date:
Subject: Re: PL/pgSQL 2