pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eugen Konkov <kes-kes@yandex.ru>
To: Bruce Momjian <bruce@momjian.us>
To: pgsql-docs@lists.postgresql.org
Subject: Re: Improve documentation for current_setting function
Date: Fri, 22 Feb 2019 11:43:54 +0200
Message-ID: <925065522.20190222114354@yandex.ru> (raw)
In-Reply-To: <20190222013924.2s77vm2cux3r54y2@momjian.us>
References: <155066758528.1380.15762542539181651429@wrigleys.postgresql.org>
	<20190222013924.2s77vm2cux3r54y2@momjian.us>

Hello Bruce,

> How do you like the attached patch, which clarifies this?

>>in which case a missing parameter returns
>>!     NULL.

not  always. It can be NULL or empty string. It depends if the current
session is new or after finished transaction which makes 'local' changes
to setting

Take into account these steps: https://www.postgresql.org/message-id/15646-0d3caee9f6266f60%40postgresql.org

From  my  user point of view. if the boot value before transaction was
NULL then after transaction it MUST stay NULL and not empty string.

This  will  be  consistent with that if I open new parallel session it
will return NULL.

Also I see NULL value (if setting was not defined) is useful.


Also this:
set_config( 'my.name', NULL )
must  set 'my.name' to NULL or must issue warning about NULL is turned
into empty string.

Personally  I  dislike  that  NULL  is converted to empty string. This
looks ugly. =(

-- 
Best regards,
Eugen Konkov





view thread (4+ messages)  latest in thread

Message-ID: <925065522.20190222114354@yandex.ru>
Permalink:  ../925065522.20190222114354@yandex.ru/
Also on:    postgresql.org/message-id/925065522.20190222114354@yandex.ru

 · 

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: pgsql-docs@postgresql.org
  Cc: kes-kes@yandex.ru, bruce@momjian.us, pgsql-docs@lists.postgresql.org
  Subject: Re: Improve documentation for current_setting function
  In-Reply-To: <925065522.20190222114354@yandex.ru>

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

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