public inbox for [email protected]  
help / color / mirror / Atom feed
From: Zhang Mingli <[email protected]>
To: PostgreSQL Hackers <[email protected]>
To: David G. Johnston <[email protected]>
Subject: Re: Improve documentation regarding custom settings, placeholders, and the administrative functions
Date: Thu, 6 Feb 2025 10:36:20 +0800
Message-ID: <6ffeeead-0b17-487d-860b-11cc8f18a3aa@Spark> (raw)
In-Reply-To: <CAKFQuwY0SK6JdCci1VJX6xsztRXgGeVEY-grkENZx+3CZpyPcQ@mail.gmail.com>
References: <CAKFQuwY0SK6JdCci1VJX6xsztRXgGeVEY-grkENZx+3CZpyPcQ@mail.gmail.com>

On Oct 20, 2024 at 04:12 +0800, David G. Johnston <[email protected]>, wrote:
>
> Mostly I'm pointing out the fact that one can never take the null value to be the actual value of a setting.  In terms of current_setting this then establishes the fact that the null value it may return is an error-handling alternative only and not something to be relied upon as being an actual value of the setting.

> -        Returns the current value of the+        Returns the current non-null value of the         setting <parameter>setting_name</parameter>.  If there is no such         setting, <function>current_setting</function> throws an error         unless <parameter>missing_ok</parameter> is supplied and

Hi,

current_setting() could return NULL when missing_ok is passed, so is it right to say: Returns the current non-null value of the setting <parameter>setting_name</parameter>?
As the doc is for function of current_setting(), and it could return NULL actually.

gpadmin=# \pset null NULL
Null display is "NULL".
gpadmin=# select current_setting('pg_xmen', true);
 current_setting
-----------------
 NULL
(1 row)


--
Zhang Mingli
HashData


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Improve documentation regarding custom settings, placeholders, and the administrative functions
  In-Reply-To: <6ffeeead-0b17-487d-860b-11cc8f18a3aa@Spark>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox