Re: Executing SQL commands in script files

From: simran <simran(dot)list(at)leonardchristian(dot)com>
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:49:45
Message-ID: 1045187385.9344.159.camel@pingu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

You could pipe in the sql commands...

eg.

% echo "select * from users" | psql userdb

On Thu, 2003-02-13 at 15:15, Susan Hoddinott wrote:
> 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

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2003-02-14 01:57:18 Re: [SQL] Returning result sets.
Previous Message Andres Ledesma 2003-02-14 01:46:44 Re: Executing SQL commands in script files