Re: pgsql: CREATE DATABASE cannot be executed from a function or multi-command string

Reinhard Mueller <[email protected]> Mon, 10 Nov 2008 09:33:40 +0100
Newsgroups gmane.comp.gnu.enterprise.devel
Organization GNU Enterprise
Message-ID <1226306020.7012.20.camel@dublin>
Dear Aaron,

Am Dienstag, den 04.11.2008, 12:12 -0500 schrieb Aaron S. Hawley:
> Newer version of Postgres have changed the ability to send a CREATE
> DATABASE function in a block with other statements.
> 
> I noticed this error message when running gnue-schema --createdb,
> something that gnue-setupdb uses.
> 
> http://archives.postgresql.org/pgsql-hackers/2007-09/msg00933.php
> 
> Looks like line 122 needs to change.
> 
> <http://www.gnuenterprise.org/cgi-bin/viewcvs.cgi/trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py?view=markup>
> 
> <http://svn.gnuenterprise.org/gnue/trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py>

Thank you very much for this info.

Do I understand correctly that we just have to split the

  "ABORT; CREATE DATABASE %s WITH OWNER %s ENCODING = 'UNICODE'; BEGIN"

into 3 separately sent statements?

Thanks,
Reinhard

_______________________________________________
Gnue-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue-dev
signature.asc (application/pgp-signature, 307 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQCVAwUASRfx4Cpv03KHfKbjAQL1VgP/b/kmKx7QRidQV9DDSwRXBuY3Vy3H5yKl
sVQnaRbLci86Pyvm8ptdN10RB2kLmb7YJYyIe5GpAWPgQ3Kzggc8ihq+loq/f1Jb
/PIZ0ktZSF+KL+UE+ySzvvo0mceX2HwQM/4V3YA9PbBwx3yh4Hkr8T+AS3vE3gIa
uEB0lqEUJDw=
=2Y97
-----END PGP SIGNATURE-----