This question has been flagged
2 Replies
3158 Views

Hi,

I would like to know if there is a way and how to proceed to programmatically know what is the current database name from within module scripts.

Thanks.

Avatar
Discard
Best Answer

Try this code,

    `dbName = self._cr.dbname`

Avatar
Discard
Best Answer

Hi please try this:-

>> cursor_postgres.execute("select current_database()")

Avatar
Discard