From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.sources Subject: Guile-PG 0.37 available Date: Sat, 24 May 2008 07:19:20 +0200 Message-ID: <874p8omg87.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1211606573 20701 80.91.229.12 (24 May 2008 05:22:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 May 2008 05:22:53 +0000 (UTC) Cc: guile-user@gnu.org To: guile-sources@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat May 24 07:23:29 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzmE4-00043y-6K for guile-user@m.gmane.org; Sat, 24 May 2008 07:23:28 +0200 Original-Received: from localhost ([127.0.0.1]:41808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzmDJ-0007RM-0u for guile-user@m.gmane.org; Sat, 24 May 2008 01:22:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzmD3-0007Pj-H9 for guile-user@gnu.org; Sat, 24 May 2008 01:22:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzmD1-0007PE-5e for guile-user@gnu.org; Sat, 24 May 2008 01:22:24 -0400 Original-Received: from [199.232.76.173] (port=48505 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzmCx-0007Om-6y; Sat, 24 May 2008 01:22:19 -0400 Original-Received: from [151.61.141.234] (port=43521 helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JzmCw-0003Q8-AZ; Sat, 24 May 2008 01:22:18 -0400 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1JzmA4-00043A-Ja; Sat, 24 May 2008 07:19:20 +0200 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6568 gmane.lisp.guile.sources:313 Archived-At: release notes: Saw a patch floating around to adapt Guile-PG to Guile versions other than 1.4.x, so some of that is included in this release, as the first step towards full Guile 1.8.x support. If you're interested in full Guile 1.8.x support appearing sooner, why not consider funding its development/testing/maintenance? thi README excerpt: Guile-PG is a collection of modules for Guile allowing access to the PostgreSQL RDBMS from Scheme programs. The low-level module `(database postgres)' provides an almost one-to-one correspondence with the PostgreSQL "libpq" C library interface. Other higher-level modules, typically named `(database postgres-FOO)', provide abstractions and convenience procedures. This is alpha code (pre 1.0 release). It has bugs, and the interfaces may change from version to version. NEWS excerpt: - 0.37 | 2008-05-24 - Configuration change: search $prefix for PostgreSQL headers/libs Previously, the configure script would look in the "normal" system directories (e.g., /usr/include and /usr/lib) for PostgreSQL headers and libraries, by default. Now, it looks under $prefix/include and $prefix/lib, respectively. This means that the common (for ttn) case where all three packages (Guile, PostgreSQL, Guile-PG) are installed under the same prefix (e.g., ~/local) requires one less command-line option to the configure script. In any case, `--with-libpq' and friends are still available for specifying dirs directly (see README). - Change to pg-get-connection This proc now returns #f if its arg's connection is no longer live. You should probably avoid it altogether; see following NEWS item. - Planned modesty Currently, Guile-PG exposes some accounting (implementation) details that it shouldn't. These are the "serial number" of connection and result objects, and the link between a result object the connection object where it originated. These details WILL BE REMOVED after 2008-10-01; do NOT rely on them. Practically speaking, this means `pg-get-connection' will be deleted and the external representation for the objects will drop the "N" field: until 2008-10-01: # and # after 2008-10-01: # and # To achieve `pg-get-connection' functionality, in most cases, it's enough to simply save the connection object used to make the request in the first place. ;; migration strategy: use connection object directly (define RES (pg-exec CONN ...)) (eq? (pg-get-connection RES) CONN) => #t In other cases, probably the next best solution is to define an object property for the association. ;; migration strategy: define/maintain/consult object property (define res-conns (make-object-property)) (define (conn-saving-exec conn query) (let ((res (pg-exec conn query))) (set! (res-conns res) conn) res)) (define RES (conn-saving-exec CONN ...)) (eq? (pg-get-connection RES) (res-conns RES)) => #t - Tests issue SQL commands directly to CREATE and DROP the test database Previously "make check" required the commands createdb(1) and dropdb(1) (or destroydb(1) for older PostgreSQL versions) to be installed on the system. Now, the test infrastructure uses Guile-PG module (database postgres) to connect to "template1" and issues SQL commands "CREATE DATABASE" and "DROP DATABASE" directly. [ttn musing ...] This change unfortunately does not remove a long- standing unexplained phenomenon: although the procs for doing the create/drop (now) take care to `pg-finish' the connection to template1 (see test/testing.scm, last page), it seems PostgreSQL does not synchronously "finish" internally using template1. This explains the (previously one `sleep' and now) two `usleep' calls, which ideally would not be necessary. Perhaps after the planned modesty occurs (see above), things will be more deterministic? - New (database postgres-meta) proc: information-schema-names - New (database postgres-meta) proc: information-schema-coldefs These procs describe Guile-PG's "standard introspection" support, as specified in the PostgreSQL 7.4.19 documentation (chapter 32, "The Information Schema"). Additionally, loading the module defines type converters for `cardinal_number', `character_data' and `sql_identifier'. The `time_stamp' type converter does not seem to be used and is not provided. - New pgtable-manager (and -worker) command: #:finish This closes the (internal) connection and arranges for all future invocations of the closure to signal a "dead connection" error. - Proc `gxrepl' closes connection when done - New support for #:FOO-all combiners in `parse+make-SELECT-tree' This (database postgres-qcons) proc now supports #:union-all, #:intersect-all and #:except-all, as combiners. - Maintenance uses autoconf 2.62, automake 1.10.1, libtool 2.2.2 tarball, prettified source, etc, in dir: http://www.gnuvola.org/software/guile-pg/ atom feed: http://www.gnuvola.org/NEWS.xml.gz