You're right.  It's a type in pg_dumpall.c

I have attached a fix for it.

Chris

> > ;CREATE DATABASE keystone WITH OWNER = chriskl TEMPLATE = 
> template0 ENCODING
> > = 'SQL_ASCII';
> > 
> > Why are all the CREATE DATABASE statements commented out?  
> Surely that will
> > make the restore fail?
> 
> Just guessing:
> 
> The first line does not have a ; at the end; so the first semicolon (at
> the beginning of second line) will end the first line; will not comment
> the CREATE DATABASE line...
> 
> I mean, it might work as below:
> DROP DATABASE au_shipping;
> 
> CREATE DATABASE au_shipping WITH OWNER = auadmin TEMPLATE = template0
> ENCODING = 'SQL_ASCII';

Index: src/bin/pg_dump/pg_dumpall.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dumpall.c,v
retrieving revision 1.12
diff -c -r1.12 pg_dumpall.c
*** src/bin/pg_dump/pg_dumpall.c        2003/01/06 18:53:25     1.12
--- src/bin/pg_dump/pg_dumpall.c        2003/01/16 08:41:49
***************
*** 397,403 ****
                buf = createPQExpBuffer();
  
                if (output_clean)
!                       appendPQExpBuffer(buf, "DROP DATABASE %s\n;", fmtId(dbname));
  
                appendPQExpBuffer(buf, "CREATE DATABASE %s", fmtId(dbname));
                appendPQExpBuffer(buf, " WITH OWNER = %s TEMPLATE = template0", 
fmtId(dbowner));
--- 397,403 ----
                buf = createPQExpBuffer();
  
                if (output_clean)
!                       appendPQExpBuffer(buf, "DROP DATABASE %s;\n", fmtId(dbname));
  
                appendPQExpBuffer(buf, "CREATE DATABASE %s", fmtId(dbname));
                appendPQExpBuffer(buf, " WITH OWNER = %s TEMPLATE = template0", 
fmtId(dbowner));
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to