Re: proposal: schema PL session variables

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: proposal: schema PL session variables
Дата
Msg-id 56B88FE2.3050304@joh.to
обсуждение исходный текст
Ответ на Re: proposal: schema PL session variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: schema PL session variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 08/02/16 13:41, Pavel Stehule wrote:
> 2016-02-08 13:22 GMT+01:00 Marko Tiikkaja <marko@joh.to>:
>> Personally I find that undesirable.  I don't know what oracle does, but
>> variables being visible without schema-qualifying them can introduce
>> variable conflicts in PL/PgSQL.  I'd prefer if you could only refer to them
>> by prefixing them with the schema name (or maybe allow search_path to be
>> used).
>
> I hope so there are not new conflicts - schema variable is not directly
> visible from SQL (in this iteration) - they are visible only from functions
> - and the behave is same like global plpgsql variable. So schema variable
> can be in conflict with SQL identifier only exactly identically as plpgsql
> variable

Yeah, and that's exactly what I don't want, because that means that 
CREATE SCHEMA VARIABLE suddenly breaks existing code.

> But prefix can be used.

Sure, but I don't see the point.  Is there a reason not to require such 
variable references to be prefixed with the schema name?  Or explicitly 
bring them into scope in the DECLARE section somehow.


.m



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: proposal: make NOTIFY list de-duplication optional
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgbench stats per script & other stuff