Re: Current cvs does not compile jdbc1 driver

Started by Bruce Momjianalmost 25 years ago1 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

Bruce,

Sorry wrong cvs option

What is your environment? I think you are using jdk 1.2, no? The problem
is that in jdk1.1? There is no Properties.setProperty
If you are using jdk1.2 then it will compile fine. The following patch
works with all of the compilers

Dave

Index: Connection.java
===================================================================
RCS file:
/home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Co
nnection.java,v
retrieving revision 1.21
diff -c -r1.21 Connection.java
*** Connection.java     2001/07/30 14:51:19     1.21
--- Connection.java     2001/08/03 16:27:26
***************
*** 1036,1043 ****
if(catalog!=null && !catalog.equals(PG_DATABASE)) {
close();
Properties info=new Properties();
!           info.setProperty("user", PG_USER);
!           info.setProperty("password", PG_PASSWORD);
openConnection(PG_HOST, PG_PORT, info, catalog, this_url,
this_driver);
}
}
--- 1036,1043 ----
if(catalog!=null && !catalog.equals(PG_DATABASE)) {
close();
Properties info=new Properties();
!           info.put("user", PG_USER);
!           info.put("password", PG_PASSWORD);
openConnection(PG_HOST, PG_PORT, info, catalog, this_url,
this_driver);
}
}

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: August 3, 2001 12:22 PM
To: dave@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Current cvs does not compile jdbc1 driver

I am confused. It compiles here. I don't understand this patch either.
Can you send a context diff?

Here is a quick hack to get it to compile properly

Index: Connection.java 
===================================================================
RCS file: 
/home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/
Co
nnection.java,v
retrieving revision 1.21
diff -f -r1.21 Connection.java
c1039 1040
info.put("user", PG_USER);
info.put("password", PG_PASSWORD);
-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, Pennsylvania
19026
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026