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

Re: Executing SQL commands in script files

From: "Andres Ledesma" <aledes(at)telefonica(dot)net>
To: "Susan Hoddinott" <susan(at)perth(dot)dialix(dot)com(dot)au>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Executing SQL commands in script files
Date: 2003-02-14 01:46:44
Message-ID: 001101c2d3ca$ee669530$02001aac@maradis (view raw or flat)
Thread:
Lists: pgsql-novice
psql < scriptfile.txt

    or in a psql console

\i scriptfile.txt

  ----- Original Message ----- 
  From: Susan Hoddinott 
  To: pgsql-novice(at)postgresql(dot)org 
  Sent: Thursday, February 13, 2003 5:15 AM
  Subject: [NOVICE] Executing SQL commands in script files


  Following reading through all the documentation it is not clear to me how to run a script file containing a number of SQL commands.  Presumably I do this through the psql interface but how do I tell it to run a script?

In response to

pgsql-novice by date

Next:From: simranDate: 2003-02-14 01:49:45
Subject: Re: Executing SQL commands in script files
Previous:From: Michael WeaverDate: 2003-02-14 01:44:09
Subject: Returning result sets.

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