CREATE DATABASE cannot run inside a transaction block

1,674 views
Skip to first unread message

at

unread,
Oct 2, 2013, 8:57:24 AM10/2/13
to web...@googlegroups.com
Hi,

I am getting following error message while trying to run statements:

    db0 = DAL('postgres://adminuser:testing@localhost/postgres')
    result
=db0.executesql('create database mydb owner user1;')


<class 'gluon.contrib.pg8000.errors.ProgrammingError'> ('ERROR', '25001', 'CREATE DATABASE cannot run inside a transaction block')


Can someone help pls.
Can we create a postgres database within a web2py app?

Thanks

Richard Vézina

unread,
Oct 2, 2013, 10:11:31 AM10/2/13
to web2py-users
See my answer to your precedent question!!

Richard


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Richard Vézina

unread,
Oct 2, 2013, 10:12:59 AM10/2/13
to web2py-users
I recommand you using psycopg2 adapter instead of pg8000 that is not as well tested...

Richard

at

unread,
Oct 3, 2013, 5:40:47 AM10/3/13
to web...@googlegroups.com

thank you richard!
Reply all
Reply to author
Forward
0 new messages