[Zope-DB] Bug? with psycopg DBA?

Charlie Clark charlie@begeistert.org
Tue, 03 Dec 2002 12:35:31 +0100


I reported something similar a few weeks ago but wasn't able to pinpoint 
what was happening when. I've since done some more detailed tests and it 
seems, to me at least, there is a bug in the pyscopg DBA.


I develop my current site on my notebook, export, copy the .zexp to the 
server and import the .zexp on the server. I try and always create my 
tables using explicit ZSQL-methods so that redeployment is easier. This 
worked fine when I was using MySQL which I've replaced with PostgreSQL 
which is a much better database and I think the DBA is better. However, it 
is no longer possible to create tables this way: my ZSQL methods execute 
without errors but no tables are created! All other ZSQL methods work fine.=
In order to be able to create the tables as specified in my ZSQL methods I 
need to create a new DBA and tell the individual ZSQL methods to use it 
which kind of defeats the purpose.

I thought this might possibly have something to do with developing on Win2K=
and running on Linux but I get exactly the same problems if I create a copy=
of the site on the same machine and try and use a DBA with the same name 
but different connection details (ie. a test database) inside the copy 
folder. As noted this only seems to affect create table statements.

Is this a bug?

My understanding of the way this should work is:

   myPsycopg DBA (dbname =3D db1...) title "db connection"
   =09=09ZSQL-methods all use "db connection"
   =09=09myPscopy DBA (dbname =3D db2...) title "db connection"
=09=09ZSQL-methods still all use "db connection" but refer to db2

Is this right? Or what am I doing wrong?