Re: Read data from text file

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Read data from text file
Date: 2009-05-25 23:37:09
Message-ID: 4A1B2BA5.6030009@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Just E. Mail wrote:
> What is the command to create a table from a pre-written description
> text file?
>
> In mysql it is:
>
> %mysql sample_db < create_xxxx.sql
>
> In postgresql, there are schema and I want to create the DB in a
> particulat schema!

When I have multiple schemas in one database; I generally have a user
that "owns" each schema, as in:

CREATE USER kevin;
CREATE SCHEMA kevin AUTHORIZATION kevin;

Then I process the sql commands with:

% psql db_kevin kevin < create-kevin.sql

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ron Arts 2009-05-26 08:32:03 I don't understand this explain output
Previous Message Just E. Mail 2009-05-25 20:07:35 Read data from text file