Skip site navigation (1) Skip section navigation (2)

Schema Problem

From: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Schema Problem
Date: 2007-07-02 08:44:59
Message-ID: 007801c7bc85$4ac7aa60$170211ac@LIONKING.COM (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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

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

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

Please suggest me the corrective action.

Thanks In advance



pgsql-novice by date

Next:From: John DeSoiDate: 2007-07-02 12:14:10
Subject: Re: Schema Problem
Previous:From: Loredana CurugiuDate: 2007-07-02 08:23:58
Subject: Replace usage of a table in query with its array values

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group