Re: Connect to a database in a .sql file

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Assad Jarrahian <jarraa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Connect to a database in a .sql file
Date: 2005-11-07 02:26:50
Message-ID: 436EBB6A3DD.3395KG@129.180.47.120
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 6 Nov 2005 18:06:11 -0700, Assad Jarrahian <jarraa(at)gmail(dot)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(at)kgb(dot)une(dot)edu(dot)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 : :
+---------------------------------------+-----------------+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F. O'Connell 2005-11-07 05:55:09 Re: Subqueries
Previous Message Leonel Nunez 2005-11-07 02:10:51 PygreSQL ByteA