Re: [SQLObject] Re: Checking if a database exists using SQLObject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2005-07-15 18:04:06
|
On Fri, Jul 15, 2005 at 02:39:15PM -0300, Evandro Vale Miquelito wrote: > As I can see, the only way I can do that is checking the database > system(postgres, mysql...) and verifying specific exceptions. In Postgres you can do the ususal trick - connect to template1 database and list availabale databases. In all databases including Postgres distinguish connection error (no server on the host:port), no db error and auth error. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |