]> granicus.if.org Git - postgresql/commit
Fix assorted places in psql to print version numbers >= 10 in new style.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Aug 2016 19:58:31 +0000 (15:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Aug 2016 19:58:31 +0000 (15:58 -0400)
commit6d1dc2afbd5536e39977343c7e11b6954c9ceaf8
treec42016df8cecfe55077adb6cee19a0f4dbbbf97a
parent4ac3d779477fbb08799c70348e1e6f8c9046e187
Fix assorted places in psql to print version numbers >= 10 in new style.

This is somewhat cosmetic, since as long as you know what you are looking
at, "10.0" is a serviceable substitute for "10".  But there is a potential
for confusion between version numbers with minor numbers and those without
--- we don't want people asking "why is psql saying 10.0 when my server is
10.2".  Therefore, back-patch as far as practical, which turns out to be
9.3.  I could have redone the patch to use fprintf(stderr) in place of
psql_error(), but it seems more work than is warranted for branches that
will be EOL or nearly so by the time v10 comes out.

Although only psql seems to contain any code that needs this, I chose
to put the support function into fe_utils, since it seems likely we'll
need it in other client programs in future.  (In 9.3-9.5, use dumputils.c,
the predecessor of fe_utils/string_utils.c.)

In HEAD, also fix the backend code that whines about loadable-library
version mismatch.  I don't see much need to back-patch that.
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/dumputils.h
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/describe.c