how to do a SET search_path?

Поиск
Список
Период
Сортировка
Искать

how to do a SET search_path?

От:
"Patrick Hatcher" <PHatcher@macys.com>
Дата:
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?

TIA

Patrick Hatcher


Re: how to do a SET search_path?

От:
Curt Sampson <cjs@cynic.net>
Дата:
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     +81 90 7737 2974   http://www.NetBSD.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

Re: how to do a SET search_path?

От:
"Patrick Hatcher" <PHatcher@macys.com>
Дата:

thank you

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-422-1610 office
HatcherPT - AIM


                                                                                                                                         
                    Curt Sampson                                                                                                         
                                                                        
                    >                    cc:     pgsql-jdbc@postgresql.org                                                               
                                         Subject:     Re: [JDBC] how to do a SET search_path?                                            
                    08/24/2003                                                                                                           
                    06:22 PM                                                                                                             
                                                                                                                                         




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     +81 90 7737 2974   http://www.NetBSD.org
    Don't you know, in this new Dark Age, we're all light.  --XTC



Re: how to do a SET search_path?

От:
CoL <col@mportal.hu>
Дата:
you can set more than one, use:
....("set search_path = myschema,pg_catalog,public");

C.

Patrick Hatcher wrote, On 8/25/2003 5:49 PM:

> thank you

FAQ