[Zope-dev] PostgreSQL and Zope (was Re: [Zope] Summary of DB Discussion)

Hannu Krosing hannu@tm.ee
Wed, 10 Nov 1999 22:37:16 +0200


"Ross J. Reedstrom" wrote:
> 
> If you haven't looked at PostgreSQL since it's Postgres95 days, it's
> definitely time to look again.  To get this back on topic for the Zope
> lists, in particular, I think DC should take a serious look at it:
> the licenses are compatible (pgsql is Berkeley software, after all) and
> the corporate attitudes are compatible.  (The core developers recently
> formed PostgreSQL, Inc. and are learning how to be a business, as well as
> a project: could probably use some pointers from you folks ;-) As another
> poster mentioned, pgsql is an EORDBMS: Extensible Object Relational DBMS,
> and not only because you get the source. Building a ZStore for the ZODB on
> top of PostgreSQLs object features should be easier that relying totally
> on relational calculus, and might reveal some interesting synergies.

Apart from being EORDBMS, it has another nice feature that could (or even 
should ?) be used in DA and possibly even in ZODB-over-PostgreSQL, 
namely the LISTEN/NOTIFY that could be used (combined with triggers) 
both for determining cache'ing times for queries and synchronizing shared 
ZODB for multiple Zope frontends.

And one more thing that maybe is no different from MySQL, but still important
for some - PostgreSQL is used in projects storing tens or even hundreds of 
Gigabytes.

> 
> If I could unleash the crystal ball (rose tinted), I can see future
> where Zope and PostgreSQL are the defacto next generation tools for
> web applications, taking over from perl and MySQL as more critical,
> core business functions move to the web.

Yess! PostgreSQL 7.0 + Zope 2.2 = PostgreSQL 8i :)

> 
> Boy, now that I've expressed all that in words, I better get cracking on
> that DA, shouldn't I? Now that 2.0 seems to have settled down a little,
> (and 2.1 is in beta) any one want to take a crack at helping? 

I've sent one additional method for query_result object to D'Arcy that 
returns more detailed info about types and sizes/precisions of returned
data.

If it does not appear in _pgmodule but you need it in improving the DA I 
may send it directly to you.

There was also another patch (not by me)that returned NULL's as None's 
(instead of '' or 0).

>Patches always welcome!

My current biggest gripes are some missing types in Zope (Time and BigDecimal,
pure DATE (without the 12.00 time part) would also be nice), that can't be 
remedied by just improving the DA.

And the _pgmodule still lacks some functionality of libpq (like decoupling 
sending query and receiving the result), so I guess that better database 
(PostgreSQL) integration requires patches to all three - Zope, ZPgSQLDA,and 
PyGreSQL.

-----------
Here I also take the opportunity to once again ask the Zope-dev list :

What do people think, If I need both Date, Time and DateTime types,
could I just make a product that uses mxDATE to have it or should I
patch/replace the builtin Date.py ?

If i make a product can I also make the formats work for my new types ?
------------

Hannu