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

From Joe Conway
Subject Re: current_setting returns 'unset'
Date
Msg-id 43C3D182.30207@joeconway.com
Whole thread Raw
In response to current_setting returns 'unset'  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> The function current_setting returns 'unset' if a parameter is not 
> set.

> This is not documented,

It is documented to produce equivalent output as the sql SHOW command. 
Although the reference page for SHOW does not specifically address 
parameters that are not set, it does have one in the example at the bottom.

> so I guess this just arose out of the implementation, or is this intentional?

The implementation was based on infrastructure already existing for
SHOW, so this is an artifact of that implementation. In the case of a 
string variable, _ShowOption() returns "unset" when a parameter is not 
set, and that gets passed all the way back.

Joe



pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: lookup_rowtype_tupdesc considered harmful
Next
From: Tony Caduto
Date:
Subject: Question about Postgresql time fields(possible bug)