From emarsden at laas.fr Wed Mar 3 13:47:46 2004 From: emarsden at laas.fr (Eric Marsden) Date: Wed, 03 Mar 2004 14:47:46 +0100 Subject: [pg-devel] project created Message-ID: I have created a web page for the project, visible at http://www.common-lisp.net/project/pg/ imported my current pg-dot-lisp sources to the CVS repository, and tagged them as release 0.20. There aren't many changes relative to release 0.19. -- Eric Marsden From emarsden at laas.fr Wed Mar 3 14:13:33 2004 From: emarsden at laas.fr (Eric Marsden) Date: Wed, 03 Mar 2004 15:13:33 +0100 Subject: [pg-devel] plans for v3 protocol Message-ID: Hi, pg-dot-lisp currently supports only the v2 frontend/backend protocol, which is implemented by PostgreSQL versions up to and including 7.3. Version 7.4 introduces a new v3 protocol, which is more pleasant in several aspects: - better error reporting, with various fields including the type of the message, instead of a simple error string. This should allow us to improve the mapping onto Common Lisp conditions, by introducing more error classes - allowing prebound queries with placeholder values (improved efficiency for certain use-cases) - more regular protocol, so cleaner implementation The new protocol has been introduced in a backward-compatible manner, and v7.4 backends are still able to talk the old version of the protocol, so the current pg-dot-lisp code works fine with PostgreSQL 7.4, though without profiting from these benefits. Peter Van Eynde has implemented the v3 protocol in Common Lisp. To integrate this with the current pg-dot-lisp code base, while retaining compatibility with older PostgreSQL versions, my plan is the following: - create PGCON-V2 and PGCON-V3 classes - modify PG-CONNECT to negociate the highest protocol version supported by the backend, and return either a PGCON-V2 or PGCON-V3 object - change PG-EXEC, FN and PG-DISCONNECT to be generic functions dispatching on the type of their first argument - split out the v2 protocol code from pg.lisp into protocol-v2.lisp, and add PVE's code as protocol-v3.lisp Hopefully this will get us the best of both worlds without too much pain. I suspect there will be remaining problems with the error handling, which may have to be separated according to the protocol version; we'll see. [Grr, it seems that posting via the NNTP interface doesn't propagate to the mailing list ...] -- Eric Marsden From emarsden at laas.fr Fri Mar 5 18:14:01 2004 From: emarsden at laas.fr (Eric Marsden) Date: Fri, 05 Mar 2004 19:14:01 +0100 Subject: [pg-devel] plans for v3 protocol In-Reply-To: (Eric Marsden's message of "Wed, 03 Mar 2004 15:13:33 +0100") References: Message-ID: >>>>> "ecm" == Eric Marsden writes: ecm> - create PGCON-V2 and PGCON-V3 classes ecm> ecm> - modify PG-CONNECT to negociate the highest protocol version ecm> supported by the backend, and return either a PGCON-V2 or ecm> PGCON-V3 object ecm> ecm> - change PG-EXEC, FN and PG-DISCONNECT to be generic functions ecm> dispatching on the type of their first argument ecm> ecm> - split out the v2 protocol code from pg.lisp into ecm> protocol-v2.lisp, and add PVE's code as protocol-v3.lisp I've committed support for this, and it passes the tests against both PostgreSQL 7.3 and 7.4. There is still some cleanup work to be done. Next stop: support for prebound queries! -- Eric Marsden