Tables not created in proper schema

From: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Tables not created in proper schema
Date: 2007-07-02 05:43:54
Message-ID: 004001c7bc6b$fd4ea220$170211ac@LIONKING.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All,
I am trying to create databse with script.
I run this script from root prompt with command

$ su - postgres -c 'path to script.sql'

In the script I follow following steps

1) create user xyz
2) create database xyz -O xyz
3) create schema xyz
4) {PG_PATH}/psql -d xyz -U xyz -f /usr/local/pgsql/QS/QS_100_2_Create_Table.sql -q -1

But still the tables are created in the public schema and not in xyz schema

Postgresql.conf entry:
serach path =' "$user",public'

tried with setting :
search path = ' xyz,"$user",public'
Same result

OR
search path = ' "$user",xyz,public'
Same result

OR
search path = ' "$user",xyz'
Error:no schema has been selected to create in

Please suggest me the corrective action.

Thanks In advance

Ashish...

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ashish Karalkar 2007-07-02 05:47:02 Re: assigning password from script
Previous Message Nick Johnson 2007-07-02 05:40:55 Re: 'Session local' variables