-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jung wrote:
> 
> 
> --On 19. Dezember 2005 15:32:46 +0100 Pier Luigi Fiorini
> <[EMAIL PROTECTED]> wrote:
> 
>> Hello,
>> I'm developing a Zope application that uses a PostgreSQL connection and
>> several ZSQL objects.
>> People should log in using a Postgres user and ZSQL object should be
>> executed  by the user that's logged in. Multiple people can be logged at
>> the same time. Unfortunately it is not possible because the same Postgres
>> connection is used  by all the ZSQL object. Is there a way to change the
>> user executing a ZSQL  query?
>>
> 
> The short version: forget it. DA connections are tied to a particular user.
> Connections are persistent and shared across threads and requests. You
> really don't want to connect/re-connect for every request and user. You
> would have to implement your own connection management including connection
> pooling *somehow*.

Heh, one could create a user-specific connection and stash it in the
session. ;)  This would actually be a lot like what some of the more
RDB-centric web frameworks do already.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDptj2+gerLs4ltQ4RAt3NAJ93414VDh+tOibJGXENarPaai1x1gCggOD6
sRvr/l2jNeYXaTExZm2A4Wg=
=zWbW
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to