postgresql/src/bin/psql
Tom Lane 9ae9d8c154 Add psql variables showing server version and psql version.
We already had a psql variable VERSION that shows the verbose form of
psql's own version.  Add VERSION_NAME to show the short form (e.g.,
"11devel") and VERSION_NUM to show the numeric form (e.g., 110000).
Also add SERVER_VERSION_NAME and SERVER_VERSION_NUM to show the short and
numeric forms of the server's version.  (We'd probably add SERVER_VERSION
with the verbose string if it were readily available; but adding another
network round trip to get it seems too expensive.)

The numeric forms, in particular, are expected to be useful for scripting
purposes, now that psql can do conditional tests.

Fabien Coelho, reviewed by Pavel Stehule

Discussion: https://postgr.es/m/alpine.DEB.2.20.1704020917220.4632@lancre
2017-09-05 10:51:36 -04:00
..
po Translation updates 2017-08-07 13:55:34 -04:00
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Fix broken link-command-line ordering for libpgfeutils. 2017-07-14 12:26:53 -04:00
command.c Add psql variables showing server version and psql version. 2017-09-05 10:51:36 -04:00
command.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
common.c psql: Fix \gx when FETCH_COUNT is used 2017-08-24 16:20:50 -04:00
common.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
conditional.c Support \if ... \elif ... \else ... \endif in psql scripting. 2017-03-30 12:59:24 -04:00
conditional.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
copy.c Manually un-break a few URLs that pgindent used to insist on splitting. 2017-06-21 16:02:08 -04:00
copy.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
create_help.pl Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
crosstabview.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
crosstabview.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
describe.c Fix up some misusage of appendStringInfo() and friends 2017-08-15 23:34:39 -04:00
describe.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
help.c Add psql variables showing server version and psql version. 2017-09-05 10:51:36 -04:00
help.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
input.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
input.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
large_obj.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
large_obj.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
mainloop.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
mainloop.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
nls.mk Translation updates 2017-08-07 13:55:34 -04:00
prompt.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
prompt.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
psqlrc.sample Improve FILES section of psql reference page. 2014-01-14 19:27:57 -05:00
psqlscanslash.h Support \if ... \elif ... \else ... \endif in psql scripting. 2017-03-30 12:59:24 -04:00
psqlscanslash.l Allow psql variable substitution to occur in backtick command strings. 2017-04-01 21:44:54 -04:00
settings.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
startup.c Add psql variables showing server version and psql version. 2017-09-05 10:51:36 -04:00
stringutils.c Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
stringutils.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
tab-complete.c psql: Add tab completion for \pset pager 2017-08-15 19:12:29 -04:00
tab-complete.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
variables.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
variables.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00