Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4570 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
2225
2
feb 23
6312
1
mar 18
3445
1
mar 17
3415
1
ago 16
5049