Re: current_setting returns 'unset'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: current_setting returns 'unset'
Дата
Msg-id 29515.1136905296@sss.pgh.pa.us
обсуждение исходный текст
Ответ на current_setting returns 'unset'  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: current_setting returns 'unset'  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> The function current_setting returns 'unset' if a parameter is not set.  
> Should it not return null?  This is not documented, so I guess this just 
> arose out of the implementation, or is this intentional?

That's because SHOW does the same thing.  SHOW has a little problem in
that it can't readily show the difference between "null" and an empty
string, so while I find the behavior pretty ugly, I don't have a better
idea.

The question thus is do you want the function behaving differently from
SHOW.  Returning NULL is probably better from a programming point of
view, but it'd be inconsistent with the command.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: lookup_rowtype_tupdesc considered harmful
Следующее
От: Neil Conway
Дата:
Сообщение: Re: lookup_rowtype_tupdesc considered harmful