Re: Executing SQL Script

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jamie Deppeler <jamie(at)doitonce(dot)net(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Executing SQL Script
Date: 2005-06-16 06:01:14
Message-ID: 42B115AA.8080304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jamie Deppeler wrote:
> This is a simple question what is the best way to execute a SQL script,
> this script will create schemas and tables for a database i created.

psql -f my_script_file -U username mydbname
or
psql -U username mydbname < my_script_file

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Sherry 2005-06-16 06:20:34 Re: Autovacuum in the backend
Previous Message Tom Lane 2005-06-16 05:32:16 Re: Autovacuum in the backend