Re: psql and Postgres 7.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql and Postgres 7.2
Date: 2022-01-21 18:49:30
Message-ID: 1202445.1642790970@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> src/bin/psql/command.c
> /*
> * Ideally we should treat the arguments as SQL identifiers. But for
> * backwards compatibility with 7.2 and older pg_dump files, we have to
> * take unquoted arguments verbatim (don't downcase them). For now,
> * double-quoted arguments may be stripped of double quotes (as if SQL
> * identifiers). By 7.4 or so, pg_dump files can be expected to
> * double-quote all mixed-case \connect arguments, and then we can get rid
> * of OT_SQLIDHACK.
> */

> Since Postgres 14 pg_dump only goes back to 8.0 and the \d commands in
> psql go back to 7.4, is this something that needs to hang on?

Yeah, I was wondering about that the other day. I agree that we
probably don't need to worry anymore about reading 7.2 pg_dump
output. However, people may be used to/depending on the current
behavior in other ways. It's hard to be sure, but it is worth
noting that it's been a long time since \connect arguments were
only identifiers. We'd have to consider the impact on the
connstring case, too.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-01-21 18:56:16 Re: psql and Postgres 7.2
Previous Message David G. Johnston 2022-01-21 18:46:42 Re: Using a different column name in a foreign table