pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: detecting SQL system
Date: Thu, 23 Sep 2004 19:40:47 +1200
Message-ID: <41527DFF.8040905@opencloud.com> (raw)
In-Reply-To: <025a01c4a13e$8459f9f0$0200a8c0@hogranch.com>
References: <414CB84A.2050107@opencloud.com>
	<Pine.BSO.4.56.0409200426450.12765@leary.csoft.net>
	<415218FC.9010801@opencloud.com>
	<Pine.BSO.4.56.0409230211530.25933@leary.csoft.net>
	<025a01c4a13e$8459f9f0$0200a8c0@hogranch.com>

John R Pierce wrote:
> One of the Java developers in my group asked me today if there was any 
> reliable and portable way he could query JDBC to find out what database 
> he was connected to, Postgres vs Oracle vs TimesTen vs ???

connection.getMetaData().getDatabaseProductName()

There are similar methods to get version and driver info.

-O



view thread (2+ messages)

Message-ID: <41527DFF.8040905@opencloud.com>
Permalink:  ../41527DFF.8040905@opencloud.com/
Also on:    postgresql.org/message-id/41527DFF.8040905@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, pierce@hogranch.com
  Subject: Re: detecting SQL system
  In-Reply-To: <41527DFF.8040905@opencloud.com>
  References: <414CB84A.2050107@opencloud.com> <Pine.BSO.4.56.0409200426450.12765@leary.csoft.net> <415218FC.9010801@opencloud.com> <Pine.BSO.4.56.0409230211530.25933@leary.csoft.net> <025a01c4a13e$8459f9f0$0200a8c0@hogranch.com> <41527DFF.8040905@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox