Re: batch file - Mailing list pgsql-novice

From harrold@sage.che.pitt.edu
Subject Re: batch file
Date
Msg-id Pine.LNX.4.21.0105281004590.21080-100000@sage.che.pitt.edu
Whole thread Raw
In response to batch file  (Milen <milend@ansco.com>)
List pgsql-novice
On Fri, 25 May 2001, Milen wrote:

> Hi all!
>
> I want to execute several SQL statements one after another.
> Does anyone know if it is possible to create something like a "batch file"
> which contains all SQL commands I want.
> Thank you in advance!
>
> Best regards:
> Milen
>

yeah you create a text file that has contains the commands just as you
would type them in the psql environment, making sure to end each command
with a ';'.

then at the console type:

psql db_name < batchfile

--
john


pgsql-novice by date:

Previous
From: Nabil Sayegh
Date:
Subject: Re: inserting values like in mySQL
Next
From: Nabil Sayegh
Date:
Subject: Re: batch file