Re: V0.2 patch for TODO Item: SQL-language referenceparameters by name.

Поиск
Список
Период
Сортировка
От Gevik Babakhani
Тема Re: V0.2 patch for TODO Item: SQL-language referenceparameters by name.
Дата
Msg-id 000e01c81e43$f1be93e0$0a01a8c0@gevmus
обсуждение исходный текст
Ответ на Re: V0.2 patch for TODO Item: SQL-language referenceparameters by name.  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: V0.2 patch for TODO Item: SQL-language referenceparameters by name.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
So where do we go from here?

a. <function name>.<arg name>
b. <this>.<arg name>
c. ':'<argname>
d. just <argname>


option a,b and d are easy to implement.
option d would be least clear and readable considering
sql functions can be long and have multiple arguments.

option c is more difficult because gram.y has to be modified
to understand ':'<identifier> as parameter but not a target_list item.

option a and b would make the source more readable
but extra documentation has to be provided to describe
how to refer arguments by name.

Regards,
Gevik

------------------------------------------------
Gevik Babakhani

PostgreSQL NL       http://www.postgresql.nl
TrueSoftware BV     http://www.truesoftware.nl
------------------------------------------------


> -----Original Message-----
> From: pgsql-patches-owner@postgresql.org
> [mailto:pgsql-patches-owner@postgresql.org] On Behalf Of Gregory Stark
> Sent: Saturday, November 03, 2007 6:22 PM
> To: David Fetter
> Cc: Tom Lane; Gevik Babakhani; pgsql-patches@postgresql.org
> Subject: Re: [PATCHES] V0.2 patch for TODO Item: SQL-language
> referenceparameters by name.
>
>
> "David Fetter" <david@fetter.org> writes:
>
> > What I mean by "kinda" is that it's a standard way of handling
> > parameters in Oracle and in DBI.
>
> That's a good reason *not* to use them for other purposes.
> Users trying to create procedures through DBI or other
> interfaces like it will run into problems when the driver
> misinterprets the parameters.
>
> > I think it would be a very bad idea
> > to require that people use the function name in parameters,
>
> I think were talking about only allowing it to disambiguate
> if the name is shadowed by a variable in an inner scope.
>
> --
>   Gregory Stark
>   EnterpriseDB          http://www.enterprisedb.com
>   Ask me about EnterpriseDB's RemoteDBA services!
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org
> so that your
>        message can get through to the mailing list cleanly
>


В списке pgsql-patches по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: V0.2 patch for TODO Item: SQL-language referenceparameters by name.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: V0.2 patch for TODO Item: SQL-language reference parameters by name.