Re: how to do a SET search_path?

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Patrick Hatcher <PHatcher(at)macys(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: how to do a SET search_path?
Date: 2003-08-25 01:22:11
Message-ID: Pine.NEB.4.51.0308251019510.1138@angelic-vtfw.cvpn.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, 22 Aug 2003, Patrick Hatcher wrote:

> I have two schemas (Public, MySchema) in my database, and I would like to
> set the search_path to MySchema. In the ODBC driver, I can set this at DSN
> setup by entering
> SET search_path TO MySchema.
> how do I do this with the JDBC?

statement.executeUpdate("SET search_path TO MySchema");

(Note that the description in the JDSK 1.3 API docs says, "Executes an
SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that
return nothing, such as SQL DDL statements, can be executed.")

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.NetBSD.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2003-08-25 08:22:55 Re: resultset.first() untrappable error
Previous Message Barry Lind 2003-08-24 22:14:39 Re: [BUGS] Bug #926: if old postgresql.jar in CLASSPATH,