From: David Johnston <polobo@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Inconsistent "Set Local search_path" behavior in JDBC
Date: Thu, 26 May 2011 16:42:46 -0400
Message-ID: <000301cc1be5$789a9880$69cfc980$@yahoo.com> (raw)
While doing some test development I observed the following behavior when
using SET LOCAL search_path TO . within a adhoc (BEGIN . COMMIT)
transaction.
I am working with a multiple schema database using 9.0.3 in Windows 7 64-bit
/ 9.0.801 driver
I had previously issued:
SET DATABASE search_path TO public, domain;
I then issue:
BEGIN;
SET LOCAL search_path = process, domain; [note that process is not on the
database search path]
CREATE TABLE t .
COMMIT;
At which point the table appears in the process domain.
I then issue:
BEGIN;
SET LOCAL search_path = process, domain;
INSERT INTO t (.) VALUES (.);
COMMIT;
And I get an exception that:
"relation "t" does not exist"
If I then go back and issue:
SET DATABASE search_path TO public, domain, process; [adding process to the
database search path]
I am able to successfully run the INSERT INTO transaction.
If I run the same commands (the INSERT INTO transaction) in my GUI
environment (PostgreSQL Maestro) it does not matter whether the DATABASE
search_path includes "process". It, for some reason, also does not seem to
matter when issuing the "CREATE TABLE" transaction within JDBC.
David J.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: polobo@yahoo.com
Subject: Re: Inconsistent "Set Local search_path" behavior in JDBC
In-Reply-To: <000301cc1be5$789a9880$69cfc980$@yahoo.com>
References: <000301cc1be5$789a9880$69cfc980$@yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox