Determining PostgreSQL version

I need to find out if a version of PostgreSQL installed in SPARC Solaris is > 7.2

please tell me how to do it.
thanks.

there is no solaris 7.2... but to check installed packages use "pkginfo".

no, I need to know if Postgre is >7.2

pkginfo doesn't help. it seems this is some 'custom built' postgre and pkginfo reports:
VERSION: release 5.10
but that seems like solaris version or something.

I need to be sure postgre version is above 7.2

edit:
I found this:
" How do I tell what PostgreSQL version I am running?
Run this query: SELECT version(); "

but don't know how to run query..

Try

psql --version
1 Like

doesn't work..:

 $ /usr/local/pgsql/bin/psql --version
ld.so.1: psql: fatal: libpq.so.5: open failed: No such file or directory
Killed

:frowning:

edit:
I have found the following in documentation file (usr/local/pgsql/doc/html/pgtcl.html ) :

TITLE="PostgreSQL 7.2.1 Documentation"
HREF="index.html"><LINK

is it safe to assume postgre is v7.2.1 ?

edit2:
solved, by modifying .bashrc to include LD_LIBRARY_PATH for Postgre

thanks.