Again: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL

Lists: pgsql-jdbc
From: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Again: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL
Date: 2002-12-22 12:37:58
Message-ID: 200212221337.58967.andreak@officenet.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here it is:-)

- --
Andreas Joseph Krogh <andreak(at)officenet(dot)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 Content-Type Size
AbstractJdbc1Connection.java.diff text/x-diff 1.0 KB

From: Barry Lind <blind(at)xythos(dot)com>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Again: Patch against 7.3.1 AbstractJdbc1Connection.java
Date: 2002-12-24 01:30:46
Message-ID: 3E07B8C6.2090302@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

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(at)officenet(dot)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(at)postgresql(dot)org)