Re: reading command from file

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: "Rosta Farzan" <rosta(at)acc(dot)csuhayward(dot)edu>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: reading command from file
Date: 2003-01-16 00:13:48
Message-ID: 20030116001348.2E9DC103E0@polaris.pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

check "man psql"

You want the -f (or --file) option, ie:
psql -f mystuff.psql

Cheers,
Steve

On Wednesday 15 January 2003 1:50 pm, 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 Lex Berezhny 2003-01-16 00:21:33 Re: reading command from file
Previous Message Devinder K Rajput 2003-01-16 00:09:34 Re: reading command from file