Re: Connect to a database in a .sql file - Mailing list pgsql-general

From Klint Gore
Subject Re: Connect to a database in a .sql file
Date
Msg-id 436EBB6A3DD.3395KG@129.180.47.120
Whole thread Raw
In response to Connect to a database in a .sql file  (Assad Jarrahian <jarraa@gmail.com>)
Responses Re: Connect to a database in a .sql file
List pgsql-general
On Sun, 6 Nov 2005 18:06:11 -0700, Assad Jarrahian <jarraa@gmail.com> wrote:
> Hi,
> I am writing a .sql file to create a database, connect to it and create
> tables etc. (basic db setup).
> But I cannot figure out how to connect to the server (what statement) in a
> .sql file.
>
> any help would be appreciated.

What's going to play the script?  If psql, then check out the \c
command.

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg@kgb.une.edu.au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

pgsql-general by date:

Previous
From: Leonel Nunez
Date:
Subject: PygreSQL ByteA
Next
From: Reid Thompson
Date:
Subject: Re: Using native win32 psql.exe using alternative cygwin