Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4682 Visualizzazioni

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
Abbandona
Risposta migliore

Try this code,

    `dbName = self._cr.dbname`

Avatar
Abbandona
Risposta migliore

Hi please try this:-

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
apr 24
2362
2
feb 23
6386
1
mar 18
3567
1
mar 17
3483
1
ago 16
5132