Re: current_setting returns 'unset'

From: Joe Conway <mail(at)joeconway(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: current_setting returns 'unset'
Date: 2006-01-10 15:23:46
Message-ID: 43C3D182.30207@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-10 15:25:50 Re: current_setting returns 'unset'
Previous Message Tom Lane 2006-01-10 15:01:36 Re: current_setting returns 'unset'