Thread: Again: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL
Again: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL
From
Andreas Joseph Krogh
Date:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here it is:-) - -- Andreas Joseph Krogh <andreak@officenet.no> There will always be someone who agrees with you but is, inexplicably, a moron. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+BbImUopImDh2gfQRAu6XAKCJNnLY4bWJW2OhiGaBdtZGr6C/EgCffIeC 1HvXpEu9pQlD3Crft/nzmgo= =A4Oe -----END PGP SIGNATURE-----
Attachment
Andreas, Why do you think this patch is necessary or a good idea? I know Tom has raised a set of direct issues with the patch (which I agree with), but in general I am very reluctant to add functionality to the driver that is not part of the jdbc standard, unless there are compelling reasons to do so. thanks, --Barry Andreas Joseph Krogh wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Here it is:-) > > - -- > Andreas Joseph Krogh <andreak@officenet.no> > There will always be someone who agrees with you > but is, inexplicably, a moron. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE+BbImUopImDh2gfQRAu6XAKCJNnLY4bWJW2OhiGaBdtZGr6C/EgCffIeC > 1HvXpEu9pQlD3Crft/nzmgo= > =A4Oe > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------------------ > > --- src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java 2002-11-14 06:54:39.000000000 +0100 > +++ /home/andreak/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java 2002-12-19 10:31:47.000000000+0100 > @@ -113,6 +113,7 @@ > PG_USER = info.getProperty("user"); > > String password = info.getProperty("password", ""); > + String schema = info.getProperty("schema", "public"); > PG_PORT = port; > > PG_HOST = host; > @@ -390,6 +391,20 @@ > { > ExecSQL("set autocommit = on; commit;"); > } > + acRset.close(); > + String set_schema_cmd = "set search_path TO '"+schema+"'; show search_path"; > + acRset = > + ExecSQL(set_schema_cmd); > + if (! acRset.next()) > + { > + throw new PSQLException("postgresql.con.failed", "failed setting search_path for schema: "+schema); > + } > + if (!acRset.getString(1).equals(schema)) > + { > + throw new PSQLException("postgresql.con.failed", "Namespace \""+schema+"\" does not exist"); > + } > + > + acRset.close(); > } > > // Initialise object handling > > > ------------------------------------------------------------------------ > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)