Re: NULL handling in exconfig deconstruction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: NULL handling in exconfig deconstruction
Date: 2018-11-12 16:50:53
Message-ID: 22978.1542041453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> In extension_config_remove() we first ensure that pg_extension.extconfig cannot
> contain any NULL values in the array, ERRORing out if so. Later we however ask
> for NULL values back when deconstructing the array, throwing away the results
> knowing there wont be any, which seems superfluous (and wrong if there indeed
> were any). The attached patch signals to deconstruct_array() that any NULL
> values should be considered an error instead of returned, to keep NULL value
> handling consistent (and shave two small allocations off).

LGTM, pushed.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-12 18:08:37 Re: [HACKERS] [PATCH v2] Add and report the new "session_read_only" GUC pseudo-variable.
Previous Message Tom Lane 2018-11-12 16:33:04 Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation