pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Improve default and empty privilege outputs in psql.
Date: Tue, 24 Sep 2024 17:14:42 +0200
Message-ID: <ZvLXYglRS6hMMhtr@msg.df7cb.de> (raw)
In-Reply-To: <E1r2dkc-005J8F-Qc@gemulon.postgresql.org>
References: <E1r2dkc-005J8F-Qc@gemulon.postgresql.org>

Re: Tom Lane
> Improve default and empty privilege outputs in psql.

I'm sorry to report this when 17.0 has already been wrapped, but this
change is breaking `psql -l` against 9.3-or-earlier servers:

$ /usr/lib/postgresql/17/bin/psql
psql (17rc1 (Debian 17~rc1-1.pgdg+2), Server 9.3.25)
Geben Sie »help« für Hilfe ein.

postgres =# \set ECHO_HIDDEN on
postgres =# \l
/******* ANFRAGE ********/
SELECT
  d.datname as "Name",
  pg_catalog.pg_get_userbyid(d.datdba) as "Owner",
  pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding",
  'libc' AS "Locale Provider",
  d.datcollate as "Collate",
  d.datctype as "Ctype",
  NULL as "Locale",
  NULL as "ICU Rules",
  CASE WHEN pg_catalog.cardinality(d.datacl) = 0 THEN '(none)' ELSE pg_catalog.array_to_string(d.datacl, E'\n') END AS "Access privileges"
FROM pg_catalog.pg_database d
ORDER BY 1;
/************************/

FEHLER:  42883: Funktion pg_catalog.cardinality(aclitem[]) existiert nicht
ZEILE 10:   CASE WHEN pg_catalog.cardinality(d.datacl) = 0 THEN '(none...
                      ^
TIP:  Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.
ORT:  ParseFuncOrColumn, parse_func.c:299


The psql docs aren't really explicit about which old versions are
still supported, but there's some mentioning that \d should work back
to 9.2:

      <para><application>psql</application> works best with servers of the same
       or an older major version.  Backslash commands are particularly likely
       to fail if the server is of a newer version than <application>psql</application>
       itself.  However, backslash commands of the <literal>\d</literal> family should
       work with servers of versions back to 9.2, though not necessarily with
       servers newer than <application>psql</application> itself.

\l seems a tad more important even.

Christoph





view thread (4+ messages)  latest in thread

Message-ID: <ZvLXYglRS6hMMhtr@msg.df7cb.de>
Permalink:  ../ZvLXYglRS6hMMhtr@msg.df7cb.de/
Also on:    postgresql.org/message-id/ZvLXYglRS6hMMhtr@msg.df7cb.de

 · 

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-committers@postgresql.org
  Cc: myon@debian.org, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Improve default and empty privilege outputs in psql.
  In-Reply-To: <ZvLXYglRS6hMMhtr@msg.df7cb.de>

* 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