Re: Read data from text file - SOLVED?

From: "Just E(dot) Mail" <justemail(at)imwell-usa(dot)com>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Read data from text file - SOLVED?
Date: 2009-05-27 14:23:23
Message-ID: 4A1D4CDB.6050509@imwell-usa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I believe I figured out how to solve this problem:
> 1. No need to create my own database 'my_db',
> 2. Create a new SCHEMA in the 'postgre' database,
> 3. set search path to my SCHEMA,
> 4. Load/insert data from a text file.
>
> That's it. I have not tried it yet but the research I did shows that
> it will work.
>
> Jenn

For those who are following or may read this post in the future:

My plan listed above did not work. When I tried to change the DEFAULT
SCHEMA using SET command, the data will still be inserted into the
'public' schema.

Finally I figured out that the DEFAULT setting is set in
'postgresql.conf' file; therefore I hanged the following line:

*search_path = ‘”$user”,public” ; “#” & Change to
search_path = ‘”$user”,fr_schema” *

and then:

*%> psql -f <fileto read> <Database> <Owner>*

*%> psql -f schemq.sql postgres radius*

It worked. Hope it help others.

Jennifer

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Zach Calvert 2009-05-27 14:28:18 Query Optimization
Previous Message Just E. Mail 2009-05-27 10:30:57 Re: Read data from text file - SOLVED?