Re: [HACKERS] CREATE DATABASE cannot be executed from a function or multi-command string

2007-09-24 Thread Dave Page
Andrew Dunstan wrote: src/bin/psql/common.c has a routine that lets psql get round this, by not sending a BEGIN in the case of the offending statements. I have no idea if this might be helpful for pgadmin though. Yeah, unfortunately it's not that we wrap the statement in a begin/end - we r

Re: [HACKERS] CREATE DATABASE cannot be executed from a function or multi-command string

2007-09-24 Thread Andrew Dunstan
src/bin/psql/common.c has a routine that lets psql get round this, by not sending a BEGIN in the case of the offending statements. I have no idea if this might be helpful for pgadmin though. cheers andrew Dave Page wrote: Heikki Linnakangas wrote: Dave Page wrote: I get the above error m

Re: [HACKERS] CREATE DATABASE cannot be executed from a function or multi-command string

2007-09-24 Thread Dave Page
Heikki Linnakangas wrote: Dave Page wrote: I get the above error message when creating a database in pgAdmin now: CREATE DATABASE demo WITH ENCODING='SQL_ASCII' TABLESPACE=pg_default; COMMENT ON DATABASE demo IS 'This is the demo database'; GRANT ALL ON DATABASE demo TO public; ALTER D

Re: [HACKERS] CREATE DATABASE cannot be executed from a function or multi-command string

2007-09-24 Thread Heikki Linnakangas
Dave Page wrote: > I get the above error message when creating a database in pgAdmin now: > > CREATE DATABASE demo > WITH ENCODING='SQL_ASCII' >TABLESPACE=pg_default; > COMMENT ON DATABASE demo IS 'This is the demo database'; > GRANT ALL ON DATABASE demo TO public; > ALTER DATABASE demo