[Zope] More problems with postgresql users and zope.
John Morton
jwm@plain.co.nz
Tue, 15 May 2001 15:12:28 +1200
I'm have some more problems with adding database users to a postgresql=20
database. I've got a ZSQL method that looks like this:
Args: merchant_name password
Template:
insert into pg_shadow (
usename, usesysid, usecreatedb, usetrace,=20
usesuper, usecatupd, passwd
) select=20
<dtml-sqlvar merchant_name type=3D"nb">,=20
max(usesysid) + 1, 'f', 'f','f','f',
<dtml-sqlvar password type=3D"nb">=20
from pg_shadow;
create table dummy (id int4 primary key);
grant select, insert on dummy to <dtml-var merchant_name>;
(The user add operation is a direct insert into the pg_shadow table as=20
'create user' wraps itself in a transaction and fails to work from a ZSQL=
=20
method as a results.)
The problem - this works inside a transaction from the console, but fails
when run through a Popy based DA with this error:
Error, PoPy.ProgrammingError: ERROR: aclparse: non-existent user "foowww=
"=20
Version are Popy/ZPopyDA 2.0.2, Zope 2.2.5, Postgresql 7.0.3
So what's going on here? Am I better off with a different adapter?
John