Re: How to properly use TRIM()?

Igor Korot <ikorot01@gmail.com>

From: Igor Korot <ikorot01@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, "pgsql-generallists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2026-03-07T19:13:42Z
Lists: pgsql-general
Hi, Adrian,

On Sat, Mar 7, 2026 at 7:44 AM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 3/7/26 12:11 AM, Igor Korot wrote:
> > Hi, David,
>
> >> You are asking the wrong question.  The right question is “how does one
> turn an empty array into the null value?”  Nullif is correct, you just need
> to specify an empty array (of the correct type) for the second argument.
> >
> > I don't think pg_class.reloptions is an ARRAY...
>
> I think it is:
>
> https://www.postgresql.org/docs/current/catalog-pg-class.html
>
> reloptions text[]


Then why it’s not showing {} as in the “included” columns?

Or it’s an ARRAY() implementation?

Thank you.


>
>
> > Included is one, storage is not.
> >
> > Thank you.
> >
> >>
> >> Given that error message, an array of text is the correct type.
> >>
> >> Array[]::text[]
> >>
> >> David J.
> >>
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>