Thread: how to get JDBC driver version from command line

how to get JDBC driver version from command line

From
akshunj
Date:
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.


Re: how to get JDBC driver version from command line

From
John R Pierce
Date:
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



Re: how to get JDBC driver version from command line

From
Kris Jurka
Date:

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


Re: how to get JDBC driver version from command line

From
akshunj
Date:
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.


Re: [JDBC] how to get JDBC driver version from command line

From
akshunj
Date:
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.


Re: how to get JDBC driver version from command line

From
akshunj
Date:
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.


Re: [JDBC] how to get JDBC driver version from command line

From
Dave Cramer
Date:
org.postgresql.util.PGJDBCMain

Should work


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

Re: how to get JDBC driver version from command line

From
Dave Cramer
Date:
org.postgresql.util.PGJDBCMain

Should work


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