Re: current_setting returns 'unset' - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: current_setting returns 'unset'
Date
Msg-id 200601101625.51534.peter_e@gmx.net
Whole thread Raw
In response to Re: current_setting returns 'unset'  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: current_setting returns 'unset'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Am Dienstag, 10. Januar 2006 16:01 schrieb Tom Lane:
> 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.

Since SHOW is primarily for "showing", I'd expect that that user can apply the 
visualization tweaks that the frontend provides, for instance \pset in psql, 
to tell apart null values and empty strings.  Not that "unset" is a typical 
value for string parameters, but you can see where I might go here.

Moreover, the unset state shouldn't exist at all.  No parameter can behave 
reasonably if unset behaved differently from an empty string.  Explicitly 
assigning an unset state doesn't work.  So it seems that for all external 
communication, an unset string parameter should simply display the empty 
string.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: current_setting returns 'unset'
Next
From: Joe Conway
Date:
Subject: Re: current_setting returns 'unset'