Re: Change Default Database
От | Scott Marlowe |
---|---|
Тема | Re: Change Default Database |
Дата | |
Msg-id | 1172525963.20651.39.camel@state.g2switchworks.com обсуждение исходный текст |
Ответ на | Change Default Database ("Rommel the iCeMAn" <icecrew@gmail.com>) |
Ответы |
Re: Change Default Database
|
Список | pgsql-sql |
On Mon, 2007-02-26 at 14:52, Rommel the iCeMAn wrote: > Hi again, > > Apologies for the HTML. > > This is an SQL script, it was generated by doing a schema-only database dump > using pgAdminIII (which in turn uses pgdump I believe). I've attached the > entire script. I was attempting to run this script in pgAdminIII because > that's what I used to generate it, but the more I read it seems I should try > the psql command line tool to execute this script. I'm getting the > impression that pgAdmin doesn't recognize the /connect directive. Please CC the list, as more eyes are more likely to have an answer than just mine... Yeah, I always run my scripts from psql, often called from a bash shell script. That way I can substitute server / database names in the shell script depending on what I'm trying to do. \ commands exist within the framework of psql, not outside. If pgAdmin doesn't have an equivalent type of command structure, then it won't work for this. You could always drop the db by hand, create it, connect to it, and THEN run the rest of your script, but I too think it would be easier to just run the script against psql.
В списке pgsql-sql по дате отправления: