Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vyx68-000ZAs-2w for pgsql-general@arkaria.postgresql.org; Sat, 07 Mar 2026 19:14:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyx66-009DLu-08 for pgsql-general@arkaria.postgresql.org; Sat, 07 Mar 2026 19:13:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vyx65-009DLm-2E for pgsql-general@lists.postgresql.org; Sat, 07 Mar 2026 19:13:58 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vyx62-00000001NsE-46kX for pgsql-general@lists.postgresql.org; Sat, 07 Mar 2026 19:13:57 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-79800183233so142052937b3.1 for ; Sat, 07 Mar 2026 11:13:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772910833; cv=none; d=google.com; s=arc-20240605; b=bCexkiRE22N8w1p8TTBK092sMAErwAu45GzBVLKt8bzbfmZEmnn5tw7C4uhIFESQHR f9oY2H6l6OWkgO00sd9KFgvfoaKJFnmELfASIAkeWwuNsdTmco5Dv6AW7aOXPWWFbwdB YUGMyuhMqoLI66NO/uqM9NHDy7c6Lwl+HfBTlM2FCmQxmNibzW9eBJdPSTUeYftLwSjb Jz6LTV4wawa7oaPp7gPAMVVMPZDGOYVdHjon5tntGdxrgWAgI2veLlMgHD07FNvmT13/ QCYCmkKed3CoYqy+ws/YWpDGdRuXyclUrzK6MjRVMDOexQC9roZ7mFVbBNTT9A8N640s R7qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=7NqPUmSNUhaVInti0zCVwHXWJyQzkKDBX8OhOzM8T7g=; fh=5DrNar3OrR8OKmA1lzkkcRApJuLcKRt+COFrRSWV8ng=; b=Gz4vgclQg+woFM/9QN/8Rg8onpHwTUiXHT+UWatQ02klr2EKceLdXnHve885QgYhSL w3yXxyh3rT+bBtq/KZEAVFtXjzet8j1ETO14msU9pvo3TnNHEcZuEdwjae+sqpXBUigD OqcYy5zvwmc4OpR+OGcMABOfwnOVFXN7jv+9OsiYcDW5tAL6hlXS4njLcCEWOWVyWGVY 8LuwsmRaLr22QS9eDVUFQq8Zc+UAb1g1JNDwZiYjZXZPd22qo4GU47CWemHuG2g7fXNt fOMiNxojF5LeHvrwZbEmIHQxHhBv3hkQi5BtceeqcpCDNWLBP0xjPtalRizpwFADJ7Wa GQXQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772910833; x=1773515633; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7NqPUmSNUhaVInti0zCVwHXWJyQzkKDBX8OhOzM8T7g=; b=lh/uoCIFJ5JIZpTYlFA7TiFRPzUDRu/+xb4dbW6446+VNKhU3ge9qTw8ZL8nBwWQQS p4yNrCmjdGxIweTgPit/s4pjbWydF8OLWkP83u4Yf+ipb+DCDsc0tf/mP3QRJRvJHLhc FIxevZZJis5E7e8ki9UK2zngYNmqPdqZVqomY7KT3tJEzAS0FY07LVhYFejFcfRrRmva /mD4jGk5eP/hyxG9N8D1S4QOtXomxrgMc54okcFjFYTd6mUlXO+/6qpgBqgzmC5agPKI LKlWhlobGaRqgtE39nJ8MRDtF+BUilDJt38ZFg5GTV5HX4RqqcaKPcBoVbsb6Jee2/fK RSUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772910833; x=1773515633; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7NqPUmSNUhaVInti0zCVwHXWJyQzkKDBX8OhOzM8T7g=; b=Ny+yfSRzCxLGBdkoB5dbfAf/SqcEZKwhiQeLBTkQ58gdvyUoqrXFe9NBnc+K8vFk7B kh3XoUK7leH9Lk5hfhmj/dlN3XrUYXEFdx9J/QPfBm7lLpRy3qxId1oLPpCaDoMGI3ai rdcVOgoKqeELUINE/HHSbRHdRAu7V8JFsXJ57ukk5a76YnJELuTX0MWCtkG31lvCtpX8 6X5IKmdX+8vLSeafWmnZvBZiepZ+sMV6kN755lXgamUlq+p6pD5xqgd1JrEGy65t88lJ iPbXXS+cuYVvA/qL7C/hanI2M16lxSWh9CxbsLVgh8DxpM05uhNzM07PB8shkNWg25np G5CA== X-Forwarded-Encrypted: i=1; AJvYcCWyZqeVKEy4lnBYh3ENXKwSS0D5HsYeSjGvUgRyeYL3LhvOeDse2m3dV2sL+5wrfw0lJNTBCNCO7pmEEKWB@lists.postgresql.org X-Gm-Message-State: AOJu0Yx9m+Yk0FKpiQdWC55En78U4ey8+35FJ0O8KO6JwGYxha3rZZ74 J1cxwscc+uSOJ2/4WVVjwQPJ3UMyrDo6OC87+mEu+a9DEOYGV3ITZRjt7X7ZCiou6aFosZeencn W0DPjv44A6gncGzNuibqYgYjUpIeRZ2AvtA== X-Gm-Gg: ATEYQzyuDCcGye++5kP8aFYzeGoIE7V7/wawTI6kmOf/NL1V27+/zFOa6i+7qz4pIfu AgoYZqCBsr5datOqdYH2z9uQ8XPmgrdPlPKkCQx0VSQRpm1A7Jo/IV7sFyXK3T9allaEAIZo9hC U+HdUEknPITe+6bH4ysg3Yb8xrTUn8OYqa2x5Y05nJX7SXURpfNenGRZSCRQljBjM078C8j2ST/ xAvpQ+T9jLYRHcExXEFbki/7DKDP15GmZ6TmPZB+LTy1Mba3FWiorYItkd0FMrfprl0HPRV4auf CmI= X-Received: by 2002:a05:690c:4b13:b0:796:3770:49b4 with SMTP id 00721157ae682-798d1dc49e1mr84567087b3.9.1772910833481; Sat, 07 Mar 2026 11:13:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Igor Korot Date: Sat, 7 Mar 2026 11:13:42 -0800 X-Gm-Features: AaiRm53en_L2zcNqhnfbGD_oeKD2s1EY5_eBu5bm4dAAWL40cxNk6nCcn-pohUM Message-ID: Subject: Re: How to properly use TRIM()? To: Adrian Klaver Cc: "David G. Johnston" , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000072bff3064c73f854" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000072bff3064c73f854 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Adrian, On Sat, Mar 7, 2026 at 7:44=E2=80=AFAM Adrian Klaver wrote: > On 3/7/26 12:11 AM, Igor Korot wrote: > > Hi, David, > > >> You are asking the wrong question. The right question is =E2=80=9Chow= does one > turn an empty array into the null value?=E2=80=9D 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=E2=80=99s not showing {} as in the =E2=80=9Cincluded=E2=80=9D c= olumns? Or it=E2=80=99s 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 > --00000000000072bff3064c73f854 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Adrian,

On Sat, Mar 7, 2026= at 7:44=E2=80=AFAM 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.=C2=A0 The right question is =E2= =80=9Chow does one turn an empty array into the null value?=E2=80=9D=C2=A0 = 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=E2=80=99s not showing {} as in the =E2=80=9Cincluded=E2=80=9D = columns?

Or it=E2=80=99s= 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.klave= r@aklaver.com
--00000000000072bff3064c73f854--