pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpsql utility
4+ messages / 4 participants
[nested] [flat]
* psql utility
@ 2024-07-06 19:44 Wasim Devale <wasimd60@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Wasim Devale @ 2024-07-06 19:44 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>; pgsql-admin
Hi All
I want to ask if psql is compatible with any postgresql version?
Backward compatibility won't work, I know, but can there be a confirmation
of forward compatibility from anyone?
It works but any links or documentation or if anyone faced any issues
please let me know.
Thanks,
Wasim
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql utility
@ 2024-07-06 20:08 Tom Lane <tgl@sss.pgh.pa.us>
parent: Wasim Devale <wasimd60@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2024-07-06 20:08 UTC (permalink / raw)
To: Wasim Devale <wasimd60@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>; pgsql-admin
Wasim Devale <wasimd60@gmail.com> writes:
> I want to ask if psql is compatible with any postgresql version?
> Backward compatibility won't work, I know, but can there be a confirmation
> of forward compatibility from anyone?
As far as basic functionality goes, you can mix-n-match psql and
server versions over a very wide range. psql's backslash commands
(in particular the \d family) may fail if the server is newer than
psql, if there are incompatible catalog changes psql isn't prepared
for. Tab completion might be hit-or-miss for the same reason.
As a perhaps extreme example, I tried psql 8.4 against a current
(18-to-be) server:
$ psql ...
psql (8.4.22, server 18devel)
WARNING: psql version 8.4, server version 0.0.
Some psql features might not work.
Type "help" for help.
regression=# select * from int8_tbl ; -- tab completion worked here
q1 | q2
------------------+-------------------
123 | 456
123 | 4567890123456789
4567890123456789 | 123
4567890123456789 | 4567890123456789
4567890123456789 | -4567890123456789
(5 rows)
regression=# \d int8_tbl
ERROR: column "reltriggers" does not exist
LINE 1: ...ECT relchecks, relkind, relhasindex, relhasrules, reltrigger...
^
HINT: Perhaps you meant to reference the column "pg_class.relhastriggers".
> It works but any links or documentation or if anyone faced any issues
> please let me know.
The Notes section of the psql man page says
psql 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 psql itself. However, backslash
commands of the \d family should work with servers of versions
back to 9.2, though not necessarily with servers newer than psql
itself. The general functionality of running SQL commands and
displaying query results should also work with servers of a newer
major version, but this cannot be guaranteed in all cases.
(9.2 is the current support cutoff for backslash command testing;
that horizon moves from time to time.)
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql utility
@ 2024-07-06 20:13 Ron Johnson <ronljohnsonjr@gmail.com>
parent: Wasim Devale <wasimd60@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Ron Johnson @ 2024-07-06 20:13 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Sat, Jul 6, 2024 at 3:44 PM Wasim Devale <wasimd60@gmail.com> wrote:
> Hi All
>
> I want to ask if psql is compatible with any postgresql version?
>
> Backward compatibility won't work, I know,
>
Or do you?
psql 16 is most certainly backwards compatible with PG server 9.6, for
example.
> but can there be a confirmation of forward compatibility from anyone?
>
> It works but any links or documentation or if anyone faced any issues
> please let me know.
>
> Thanks,
> Wasim
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql utility
@ 2024-07-07 06:14 Muhammad Ikram <mmikram@gmail.com>
parent: Ron Johnson <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Muhammad Ikram @ 2024-07-07 06:14 UTC (permalink / raw)
To: wasim60@gmail.com <wasim60@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>; Ron Johnson <ronljohnsonjr@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>
Hi Wasim,
As pointed out by Tom, catalog changes are likely to break or show
unexpected results. We often experienced this kind of issues in our
regression runs for a tool where we used to migrate from other databases to
different versions if Postgres Servers and then print using \… commands.
Even if these worked, we had to make adjustments.
Regards
Muhammad Ikram,
Bitnine Global
On Sun, 7 Jul 2024 at 01:14, Ron Johnson <ronljohnsonjr@gmail.com> wrote:
> On Sat, Jul 6, 2024 at 3:44 PM Wasim Devale <wasimd60@gmail.com> wrote:
>
>> Hi All
>>
>> I want to ask if psql is compatible with any postgresql version?
>>
>> Backward compatibility won't work, I know,
>>
>
> Or do you?
>
> psql 16 is most certainly backwards compatible with PG server 9.6, for
> example.
>
>
>> but can there be a confirmation of forward compatibility from anyone?
>>
>> It works but any links or documentation or if anyone faced any issues
>> please let me know.
>>
>> Thanks,
>> Wasim
>>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-07-07 06:14 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-06 19:44 psql utility Wasim Devale <wasimd60@gmail.com>
2024-07-06 20:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-07-06 20:13 ` Ron Johnson <ronljohnsonjr@gmail.com>
2024-07-07 06:14 ` Muhammad Ikram <mmikram@gmail.com>
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