Re: Get PG version using JDBC?

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Get PG version using JDBC?
Date: 2008-10-15 21:16:26
Message-ID: gd5mj8$126$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Wall wrote on 15.10.2008 23:01:
> Is there a way to get the PG version string from JDBC? I'm using PG 8.3.
>
> Thanks,
> David
>
In a portable manner:

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html#getDatabaseProductName()
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html#getDatabaseProductVersion()

Althout that will not return the information "compiled by..." as the suggested
"select version()" does

Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurent Wandrebeck 2008-10-15 21:17:31 Re: Column level triggers
Previous Message Mark Morgan Lloyd 2008-10-15 21:10:57 Re: Numbering rows