How to properly use TRIM()?

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: How to properly use TRIM()?
Date: 2026-03-07 07:30:38
Message-ID: CA+FnnTxGOqF1DN4e70KXRJakuPV_V7_vGonQTX4eEOEE92PCKw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, ALL,

draft=# SELECT c.relname AS name, ixs.tablespace, ARRAY(SELECT
a.attname FROM pg_attribute a WHERE a.attrelid = idx.indrelid AND
a.attnum = ANY(idx.indkey) AND a.attnum > 0 ORDER BY
array_position(idx.indkey, a.attnum) OFFSET idx.indnkeyatts) AS
included, NULLIF( TRIM( c.reloptions ), '' ) AS storage FROM pg_index
idx, pg_class c, pg_namespace n, pg_class t, pg_indexes ixs WHERE
ixs.indexname = c.relname AND c.oid = idx.indexrelid AND t.oid =
idx.indrelid AND n.oid = c.relnamespace AND idx.indisprimary AND
n.nspname = 'public' AND t.relname = 'leagues';
ERROR: function pg_catalog.btrim(text[]) does not exist
LINE 1: ...num) OFFSET idx.indnkeyatts) AS included, NULLIF( TRIM( c.re...
^
HINT: No function matches the given name and argument types. You
might need to add explicit type casts.
draft=# SELECT c.relname AS name, ixs.tablespace, ARRAY(SELECT
a.attname FROM pg_attribute a WHERE a.attrelid = idx.indrelid AND
a.attnum = ANY(idx.indkey) AND a.attnum > 0 ORDER BY
array_position(idx.indkey, a.attnum) OFFSET idx.indnkeyatts) AS
included, NULLIF( TRIM( BOTH FROM c.reloptions ), '' ) AS storage FROM
pg_index idx, pg_class c, pg_namespace n, pg_class t, pg_indexes ixs
WHERE ixs.indexname = c.relname AND c.oid = idx.indexrelid AND t.oid =
idx.indrelid AND n.oid = c.relnamespace AND idx.indisprimary AND
n.nspname = 'public' AND t.relname = 'leagues';
ERROR: function pg_catalog.btrim(text[]) does not exist
LINE 1: ...num) OFFSET idx.indnkeyatts) AS included, NULLIF( TRIM( BOTH...
^
HINT: No function matches the given name and argument types. You
might need to add explicit type casts.
draft=#

Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2026-03-07 07:41:43 Re: How to properly use TRIM()?
Previous Message Adrien Nayrat 2026-03-06 18:41:30 Sort and limit push down