Re: reading command from file

From: Lex Berezhny <LBerezhny(at)DevIS(dot)com>
To: Rosta Farzan <rosta(at)acc(dot)csuhayward(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: reading command from file
Date: 2003-01-16 00:21:33
Message-ID: 1042676493.15258.1.camel@hortus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

If the file containing your sql is named tables.sql you would do the
following:

$ psql -f tables.sql

You can get all the other possible arguments to psql by typing:

$ psql --help

good luck!

On Wed, 2003-01-15 at 16:50, Rosta Farzan wrote:
> Hi everybody
>
> I need help in how to read sql commands from file instead of typing in
> postgres (psql) command line. I mean I have a file which includes for
> example a create table command and I want to load it to postgres created
> database. Would you please help me with this.
> Thanks,
> Rosta
>
>
> ************************************
> Rosta Farzan
> Laboratory for Adaptive Hypermedia and Assistive Technologies
> Department of Math and Computer Science CSU Hayward
> rosta(at)acc(dot)csuhayward(dot)edu
> (510) 885-4026
> *************************************
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-01-16 00:40:22 Re: [GENERAL] gmake check error on HPUX
Previous Message Steve Crawford 2003-01-16 00:13:48 Re: reading command from file