Skip site navigation (1) Skip section navigation (2)

Re: batch file

From: harrold(at)sage(dot)che(dot)pitt(dot)edu
To: Milen <milend(at)ansco(dot)com>
Cc: "'pgsql-novice(at)postgresql(dot)org(dot)'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: batch file
Date: 2001-05-28 14:06:20
Message-ID: Pine.LNX.4.21.0105281004590.21080-100000@sage.che.pitt.edu (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-novice by date

Next:From: Nabil SayeghDate: 2001-05-28 15:42:58
Subject: Re: batch file
Previous:From: Giles LeanDate: 2001-05-28 12:33:31
Subject: Re: Table joining problem.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group