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'
|
| Список | 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 по дате отправления: