From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Peter Mount <peter(at)retep(dot)org(dot)uk> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: JDBC build patches |
Date: | 2001-03-14 22:03:11 |
Message-ID: | Pine.LNX.4.30.0103142301530.1211-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc pgsql-patches |
Peter Mount writes:
> > > So far our standard has been to use 5432 if no port is supplied.
> >
> >It's still this way. As I said, only people that use configure
> >--with-pgport see any change, and those people know what they're getting
> >into.
>
> Perhaps a message saying this (or even in the version strings within JDBC).
Version string sounds okay. A message during the build would probably get
lost.
How about this patch:
diff -u -r1.5 Driver.java.in
--- Driver.java.in 2001/03/11 11:07:01 1.5
+++ Driver.java.in 2001/03/14 21:47:09
@@ -214,7 +214,13 @@
*/
public static String getVersion()
{
- return "@VERSION@";
+ String version = "@VERSION@";
+ String defport = defaultPort();
+
+ if (defport == "5432")
+ return version;
+ else
+ return version + " (default port " + defport + ")";
}
/**
@@ -350,8 +356,13 @@
* @return the port number portion of the URL or -1 if no port was specified
*/
public int port()
+ {
+ return Integer.parseInt(props.getProperty("PGPORT", defaultPort()));
+ }
+
+ private String defaultPort()
{
- return Integer.parseInt(props.getProperty("PGPORT","@DEF_PGPORT@"));
+ return "@DEF_PGPORT@";
}
/**
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | selvam | 2001-03-16 03:37:23 | PostgresSQL and JDBC |
Previous Message | Corey Mosher | 2001-03-14 19:45:09 | RE: JDBC Errors |
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2001-03-15 22:20:51 | contrib/pgcrypto update |
Previous Message | Hiroshi Inoue | 2001-03-13 09:08:09 | Re: ODBC Driver regedit file. |