Personal tools
You are here: Home Lists ZPUG DC List Archives 2004 2004-11 Familiarity with Psycopg? / Carlo Seta <carlo.seta@HUMANITAS.COM>
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

Familiarity with Psycopg? / Carlo Seta <carlo.seta@HUMANITAS.COM>

Familiarity with Psycopg?
Carlo Seta <carlo.seta(at)HUMANITAS.COM>
2004-11-24 09:01:12 [ FULL ]
Joel,

I am curious if you have any experience with using psycopg/PostgreSQL with
Zope?  I have been working with combining the utility of external databases
with Zope and ultimately Plone Archetypes.  My questions are concerning the
installation of psycopg (using the --with-Zope=/opt/Zope/SoftwareHome271,
and then "make install-zope").  For the most part, I think I have
sucessfully compiled and installed psycopg with my Zope 2.7.1 installation
but am not 100% sure.  I can add a database connector from within my Zope
Instances (currently I have an InstanceHome and TestInstanceHome setup), but
have yet to point it at one of our PostgreSQL DBs.  Any information would be
greatly appreciated.  With that said, I hope you have a Happy Thanksgiving!

Cheers,
Carlo

Re: [ZPUGDC] Familiarity with Psycopg? / Kevin Cole <kjcole@gri.gallaudet.edu>

Re: [ZPUGDC] Familiarity with Psycopg?
Kevin Cole <kjcole(at)gri.gallaudet.edu>
2004-11-27 08:23:55 [ FULL ]
Carlo Seta wrote:[...]

My name's not Joel, but...  ;-)

In my limited experience with Zope and psycopg, all I had to do was
set the properties in the database connector.   For example, I have
a test folder called Sandbox.   I created a Z Psycopg Database Connection
there,  with (replacing the bracketed stuff with useful info):

                        Name: {database}
                       Title: {meaningful name} PostgreSQL connection
           Connection String: dbname={database} user={username}
         Connect Immediately: [x]
Use Zope's interal DateTime: [x]
            Backend encoding: UTF-8

For me that appeared to be all there was to it.  I haven't used it
from within Plone, but from within the ZMI, I was able to browse
the database and run tests.  I also created a  Z SQL method to
test it, and that worked fine as well...    (Your milage may vary.)
[...]
Attachments: 
kjcole.vcf application/octet-stream - 618 Bytes
signature.asc application/octet-stream - 257 Bytes

Re: [ZPUGDC] Familiarity with Psycopg? / joel@joelburton.com

Re: [ZPUGDC] Familiarity with Psycopg?
joel(at)joelburton.com
2004-11-27 09:20:24 [ FULL ]
On Wed, Nov 24, 2004 at 10:01:23AM -0500, Carlo Seta wrote:[...]

Carlo --

I have used this combination (I did a presentation on it at the last PyCon,
but, sorry, don't know where that is).

It's pretty straightforward. Install psycopg, using the with-zope option
(or, find an RPM, which is pretty common). Fill in the appropriate stuff
in the database adapter. Nothing different here than other Zope DAs.

Regarding using it with Archetypes: I wrote a pretty comprehensive HOWTO
on using Archetypes' SQLStorage, and the examples I used were all PG
and psycopg. This is a very different way of using Zope with a rel db
than the traditional ZSQL Methods manner, and the relative advantages
and disadvantages are discussed in that document. You'll find it in
the docs/ directory of Archetypes installations.

Good luck!

- j.

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: