pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to get JDBC driver version from command line
6+ messages / 4 participants
[nested] [flat]

* how to get JDBC driver version from command line
@ 2015-04-02 16:26  akshunj <rickjackson001@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: akshunj @ 2015-04-02 16:26 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

Is there a way to get the JDBC driver version from the command line? I'd
like to make the name generic for various administrative reasons. 

I suspect this could be done using something along the lines of:

java -cp ./postgresql.jdbc4.jar org.postgresql.Driver -version

I'm not fluent in Java, so I would appreciate any help. 

Thanks.



--
View this message in context: http://postgresql.nabble.com/how-to-get-JDBC-driver-version-from-command-line-tp5844478.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: how to get JDBC driver version from command line
@ 2015-04-02 17:59  John R Pierce <pierce@hogranch.com>
  parent: akshunj <rickjackson001@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: John R Pierce @ 2015-04-02 17:59 UTC (permalink / raw)
  To: pgsql-jdbc

On 4/2/2015 9:26 AM, akshunj wrote:
> Is there a way to get the JDBC driver version from the command line? I'd
> like to make the name generic for various administrative reasons.
>
> I suspect this could be done using something along the lines of:
>
> java -cp ./postgresql.jdbc4.jar org.postgresql.Driver -version
>
> I'm not fluent in Java, so I would appreciate any help.

pretty sure you'd need a java application that calls the 
getMajorVersion() and getMinorVersion() methods of the driver. don't 
think there's any way to do that from a command line.



-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: how to get JDBC driver version from command line
@ 2015-04-02 18:05  Kris Jurka <books@ejurka.com>
  parent: akshunj <rickjackson001@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Kris Jurka @ 2015-04-02 18:05 UTC (permalink / raw)
  To: akshunj <rickjackson001@gmail.com>; +Cc: pgsql-jdbc



On Thu, 2 Apr 2015, akshunj wrote:

> Hi,
> 
> Is there a way to get the JDBC driver version from the command line? I'd
> like to make the name generic for various administrative reasons. 
> 

java -cp postgresql.jar org.postgresql.util.PSQLDriverVersion

Kris Jurka


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: how to get JDBC driver version from command line
@ 2015-04-02 18:08  akshunj <rickjackson001@gmail.com>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 6+ messages in thread

From: akshunj @ 2015-04-02 18:08 UTC (permalink / raw)
  To: pgsql-jdbc

Kris, thank you!!! Excellent!



--
View this message in context: http://postgresql.nabble.com/how-to-get-JDBC-driver-version-from-command-line-tp5844478p5844500.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: how to get JDBC driver version from command line
@ 2017-04-14 20:20  akshunj <rickjackson001@gmail.com>
  parent: akshunj <rickjackson001@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: akshunj @ 2017-04-14 20:20 UTC (permalink / raw)
  To: pgsql-jdbc

Hi, seem the method Kris mentioned to check the version from the command line
no longer works with the latest driver version. Can anyone tell me how to
check the driver version from the command line with the latest version
42.0.0 JDBC4?

TIA



--
View this message in context: http://www.postgresql-archive.org/how-to-get-JDBC-driver-version-from-command-line-tp5844478p5956539...
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: how to get JDBC driver version from command line
@ 2017-04-15 12:58  Dave Cramer <pg@fastcrypt.com>
  parent: akshunj <rickjackson001@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Dave Cramer @ 2017-04-15 12:58 UTC (permalink / raw)
  To: akshunj <rickjackson001@gmail.com>; +Cc: pgsql-jdbc

org.postgresql.util.PGJDBCMain


Should work


Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 14 April 2017 at 16:20, akshunj <rickjackson001@gmail.com> wrote:

> Hi, seem the method Kris mentioned to check the version from the command
> line
> no longer works with the latest driver version. Can anyone tell me how to
> check the driver version from the command line with the latest version
> 42.0.0 JDBC4?
>
> TIA
>
>
>
> --
> View this message in context: http://www.postgresql-archive.
> org/how-to-get-JDBC-driver-version-from-command-line-
> tp5844478p5956539.html
> Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2017-04-15 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 16:26 how to get JDBC driver version from command line akshunj <rickjackson001@gmail.com>
2015-04-02 17:59 ` John R Pierce <pierce@hogranch.com>
2015-04-02 18:05 ` Kris Jurka <books@ejurka.com>
2015-04-02 18:08   ` akshunj <rickjackson001@gmail.com>
2017-04-14 20:20     ` akshunj <rickjackson001@gmail.com>
2017-04-15 12:58       ` Dave Cramer <pg@fastcrypt.com>

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