Re: Make psql version aware; hide tablespace from older versions - Mailing list pgsql-patches

From Greg Sabino Mullane
Subject Re: Make psql version aware; hide tablespace from older versions
Date
Msg-id a871a08ba3fbd56a4bca6c4f727d19ea@biglumber.com
Whole thread Raw
In response to Re: Make psql version aware; hide tablespace from older versions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Make psql version aware; hide tablespace from older versions
List pgsql-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Also, I see no need to write your own code to get the server version.
> libpq already does this.  It doesn't currently export an API to find it
> out, but I'd rather add that than have psql duplicate the effort.

Good point. I looked around, and not only is the code in libpq cleaner,
but it is duplicated in other applications (e.g. pg_dump). In the name
of not reinventing the wheel, I played around with making it available.
Would something like this be acceptable?:

(int) PQversionNumber

as a simple interface to the sversion variable?

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200408091920
-----BEGIN PGP SIGNATURE-----

iD8DBQFBGAbcvJuQZxSWSsgRAuuWAKDsWC2M2MqzXZV6Kx8ZQ+MnuosbUwCgukUt
NsXS8qGfUHNujPz8J2XsDqU=
=PsJs
-----END PGP SIGNATURE-----



pgsql-patches by date:

Previous
From: Josh Berkus
Date:
Subject: Postgresql.conf Documentation change
Next
From: Tom Lane
Date:
Subject: Re: Make psql version aware; hide tablespace from older versions