From: | Peter Adlersburg <peter(dot)adlersburg(at)gmail(dot)com> |
---|---|
To: | ronljohnsonjr(at)gmail(dot)com |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Get PG primary version without substring manipulation? |
Date: | 2024-06-13 13:17:25 |
Message-ID: | CAD1Uk1rme4=4qoy3RYCPW6WUrJqv2P5LRpG+EYKy7u5_=7kw5g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
cat <your data dir>/PG_VERSION
kr
Ron Johnson <ronljohnsonjr(at)gmail(dot)com> schrieb am Do., 13. Juni 2024, 14:52:
> cut, awk, head, bash, etc are easy enough, but am I overlooking some
> intrinsic method of getting just PG's primary version number (9.6 or 14, in
> my case) without doing substring manipulation?
>
> $ ssh foo.example.com pg_config --version
> PostgreSQL 9.6.24
> $ ssh foo.example.com psql --version
> psql (PostgreSQL) 9.6.24
> $ psql -h foo.example.com -Xtc "SELECT version();"
> PostgreSQL 9.6.24 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5
> 20150623 (Red Hat 4.8.5-44), 64-bit
>
> $ ssh bar.example.com pg_config --version
> PostgreSQL 14.12
> $ ssh bar.example.com psql --version
> psql (PostgreSQL) 14.12
> $ psql -h bar.example.com -Xtc "SELECT version();"
> PostgreSQL 14.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0
> 20210514 (Red Hat 8.5.0-20), 64-bit
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Fiske | 2024-06-13 13:17:47 | Re: Get PG primary version without substring manipulation? |
Previous Message | Ron Johnson | 2024-06-13 12:52:18 | Get PG primary version without substring manipulation? |