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.47 available Date: Mon, 23 Feb 2015 10:53:07 +0100 Message-ID: <87h9udq7i4.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1424685276 32584 80.91.229.3 (23 Feb 2015 09:54:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2015 09:54:36 +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 Mon Feb 23 10:54:26 2015 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YPpib-0005Ek-S0 for guile-user@m.gmane.org; Mon, 23 Feb 2015 10:54:26 +0100 Original-Received: from localhost ([::1]:42741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPpib-0002uO-2X for guile-user@m.gmane.org; Mon, 23 Feb 2015 04:54:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPpiQ-0002sU-H7 for guile-user@gnu.org; Mon, 23 Feb 2015 04:54:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPpiO-0006ww-Ma for guile-user@gnu.org; Mon, 23 Feb 2015 04:54:14 -0500 Original-Received: from mail.agora-net.com ([67.59.132.6]:36124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPpiI-0006vv-UC; Mon, 23 Feb 2015 04:54:07 -0500 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.71) (envelope-from ) id 1YPpiI-0003aZ-7e; Mon, 23 Feb 2015 04:54:06 -0500 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1YPpha-0000WW-Pf; Mon, 23 Feb 2015 10:53:22 +0100 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 67.59.132.6 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11772 gmane.lisp.guile.sources:440 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable release notes: The big news is that Guile-PG now works w/ Guile 2.0.11. This required a moderately invasive (from user pov) design change, but the result should be upward-compatible. There are a bunch of smaller changes, too. Hint: Study NEWS before upgrading! NB: All interaction w/ Guile 2.x ("./configure", "make", "make check", "make install") is done w/ =E2=80=98GUILE_AUTO_COMPILE=3D0=E2=80= =99 in the environment. Probably we will find the courage to auto-compile some day, but that day is not today. A correspondingly big thanks go to Greg Troxel (already in the THANKS file for some time, now) for spurring Guile 2.x support. The other change i want to point out is the bug-report address. 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 =E2=80=98(database postgres)=E2=80=99 provides an al= most one-to-one correspondence with the PostgreSQL "libpq" C library interface. Other higher-level modules, typically named =E2=80=98(database postgres-FOO)=E2=80=99, provide abstractions and conve= nience procedures. This is alpha code (pre 1.0 release), tested with various, but not all, versions of Guile and PostgreSQL. It may have bugs, and the interfaces may change from version to version. NEWS for 0.47 (2015-02-23): - bug-report address changed Please send bug reports to the address shown by running command: ./configure --help Mail sent to the previous address is likely to be misplaced. - changes in configuration - env vars =E2=80=98PQ_CPPFLAGS=E2=80=99 and =E2=80=98PQ_LDFLAGS=E2=80= =99 precious That is, they are now declared with =E2=80=98AC_ARG_VAR=E2=80=99 and = thus documented (in =E2=80=98--help=E2=80=99 output), checked for change o= n next invocation, etc (info "(autoconf) Setting Output Variables"). - dropped =E2=80=98configure=E2=80=99 script options The configure script no longer supports =E2=80=98--with-libpq=3DDIR= =E2=80=99, =E2=80=98--with-libpq-includes=3DDIR=E2=80=99 and =E2=80=98--with-lib= pq-lib=3DDIR=E2=80=99. You should use =E2=80=98PQ_CPPFLAGS=E2=80=99 and =E2=80=98PQ_LDFLAGS=E2= =80=99 for this. - error if PostgreSQL headers not found No =E2=80=98libpq-fe.h=E2=80=99 and =E2=80=98libpq/libpq-fs.h=E2=80= =99? Configuration fails. - error if sane libpq not found Here, sanity means "from PostgreSQL 7.4 or later", as evidenced by libpq having func =E2=80=98PQfreemem=E2=80=99. - bugfixes - memory leak in parameterized-exec procs Since their introduction w/ Guile-PG 0.30 (2006-04-04), the =E2=80=98(database postgres)=E2=80=99 procs: pg-exec-params pg-exec-prepared pg-send-query-params pg-send-query-prepared would leak memory proportional to the number of parameters in the call. Now, that memory is properly =E2=80=98free=E2=80=99d. - =E2=80=98pg-result-error-field=E2=80=99 works as advertized Since its introduction w/ Guile-PG 0.30 (2006-04-04), this proc would always return =E2=80=98#f=E2=80=99, i.e., discarding the proper= value! Now, it returns an integer, a symbol or a string, depending on the field-specified, and =E2=80=98#f=E2=80=99 only when the result ha= s no info. - non-integer exact numbers no longer accepted Previously, =E2=80=98(database postgres)=E2=80=99 procs would silentl= y accept and perhaps behave strangely because of, non-integer exact numbers (e.g., rational numbers). Now, such usage results in a "wrong type arg" error. - (doc) type converters properly indexed Guile-PG 0.45 (released 2013-03-10) introduced a regression in the guile-pg.info indexing of type converters, including the (pretty) single-quotes in the index, e.g.: =E2=80=98float4=E2=80=99 (type converter) such that typing =E2=80=98i float4=E2=80=99 in Emacs Info node could = not find the entry. This is arguably a bug in Texinfo. Now, indexing once again produces an entry in guile-pg.info w/o quotes: float (type converter) Hopefully this is immune to future Texinfo changes, if any. - portability fix: don't assume =E2=80=98(set! (P O) V)=E2=80=99 returns = =E2=80=98V=E2=80=99 Proc =E2=80=98(database postgres-types) oid-type-name-cache=E2=80=99 us= ed to return the unspecified object for some versions of Guile. - retired =E2=80=98(database postgres)=E2=80=99 procs These procs are no longer available. pg-getline pg-getlineasync pg-putline pg-endcopy This was pre-announced in Guile-PG 0.46 (2013-03-14) NEWS. - planned retirement These items WILL BE REMOVED by 2015-12-31. - proc =E2=80=98(database postgres) pg-lo-read=E2=80=99 This returns a string, which is often inconvenient or worse, unsuitable, and anyway Guile already provides various procs for reading from a port. - module =E2=80=98(database postgres-resdisp)=E2=80=99 Not very useful; will not be missed. - obsolete =E2=80=98(database postgres-types)=E2=80=99 procs The proc =E2=80=98dbcoltypes=E2=80=99 was deemed "not so useful", and= the rest are obsoleted by new abstractions: dbcoltypes dbcoltype-lookup dbcoltype:stringifier dbcoltype:default dbcoltype:objectifier define-db-col-type-array-variant There is no migration path for =E2=80=98dbcoltypes=E2=80=99 -- sorry.= For the rest, code of the form: (dbcoltype:FOO (dbcoltype-lookup TYPE)) can be replaced with: (type-FOO TYPE) where FOO is one of "stringifier", "default", "objectifier". For =E2=80=98define-db-col-type-array-variant=E2=80=99, you should ch= ange calls of the form: (define-db-col-type-array-variant COMPOSED SIMPLE ...) where COMPOSED is SIMPLE followed by N "[]" pairs, to: (register-array-variant N SIMPLE ...) and furthermore change symbols that are spelled with N "[]" pairs to those with N leading "*". For example: ;; was (define-db-col-type-array-variant 'int4[][] 'int4 ...) ;; now (register-array-variant 2 'int4 ...) A defs form (for =E2=80=98pgtable-manager=E2=80=99) would use =E2=80= =98**int4=E2=80=99 instead of =E2=80=98int4[][]=E2=80=99. The latter spelling is still supporte= d for the time being, but will probably be phased out later as Guile 2 becomes more widespread. (Guile 2 can handle square braces in symbol names but that requires modification to =E2=80=98read=E2=80=99= , i.e., =E2=80=98(read-disable 'square-brackets)=E2=80=99. This is the metho= d used by test/table-types.scm, for example.) - =E2=80=98define-db-col-type-array-variant=E2=80=99 more/less strict This =E2=80=98(database postgres-types)=E2=80=99 proc now throws an err= or if arg COMPOSED is not "based on" arg SIMPLE, or if COMPOSED does not have square braces. Thus, what was documented previously as mere convention is now elevated to requirement. On the other hand, COMPOSED may now be a string, as well as a symbol. (This is the "less strict" part.) NB: This proc is obsolete (see above). - new =E2=80=98(database postgres-types)=E2=80=99 procs These are new: type-registered? type-stringifier type-objectifier type-default type-sql-name register-array-variant - changes in testing - bugfix: test =E2=80=98alive.scm=E2=80=99 checks =E2=80=98pg-guile-pg-= loaded=E2=80=99 Previously, if the shared-object library failed to load, the test would display the "dynamic-link: file not found" message and then (bogusly) pass anyway. How lengthly lameness lasts! - bugfix: =E2=80=98INITDB=E2=80=99 value propagated Previously, for "make check INITDB=3D/some/dir/initdb", the specified =E2=80=98INITDB=E2=80=99 was ignored. Now it DTRT. - bugfix: adherence to cancellation protocol The =E2=80=98pg-request-cancel=E2=80=99 test now does "COMMIT TRANSAC= TION" to finish, and validates that command's success as well. Not doing so did not cause problems before because the test is the last one immediately prior to disconnect (see test/basic.scm). - =E2=80=98pg-result-error-field=E2=80=99 rv checked Had this been in place earlier, the bug (above) would not have stood so long. Sigh. - =E2=80=98COPY=E2=80=99..=E2=80=98STDIN=E2=80=99 no longer sends "\\.\= n" This is "deprecated" in protocol version 3.0, and probably will be removed in the future. - delays precise Previously, the test machinery would use delays to effect synchronization between client code and the daemon, and furthermore relied solely on pidfile existence. How lame! Now, it uses the recommended method, i.e., successful execution of "psql -l". See README section "Testing". - test database =E2=80=98guile_pg_test=E2=80=99 created once Previously, each test did "CREATE DATABASE" and "DROP DATABASE", a huge time-consuming redundancy. Now, database creation is done once on cluster init, and tests take care to delete the tables that they use, either explicitly with "DROP TABLE", or by using "CREATE TEMPORARY TABLE" in the first place. Should a test fail, leaving stray tables behind, you can use new command "make drop-database" in test/ to rid yourself of the evidence (after filing a bug report, right!? :-D); the database will be freshly created on next "make check". - PostgreSQL 9.3 accomodations - server config var =E2=80=98unix_socket_directories=E2=80=99 PostgreSQL 9.3 replaces config var =E2=80=98unix_socket_directory= =E2=80=99 w/ =E2=80=98unix_socket_directories=E2=80=99. No problem! - overcome "CREATE TABLE .. serial" spew reticence PostgreSQL prior to 9.3 emits a notice on "CREATE TABLE" w/ a =E2=80=98serial=E2=80=99 column. As of 9.3, the message is suppres= sed by default and only emitted if the client verbosity is at least =E2=80=98DEBUG1=E2=80=99. Details in test/basic.scm =E2=80=98test:= set-notice-out!-1=E2=80=99. - less output by default / new option =E2=80=98VERBOSE=3D1=E2=80=99 By default, "make check" now inhibits fine-grained status output. To re-enable it, use =E2=80=98make check VERBOSE=3D1=E2=80= =99. - daemon killed even on "make check" failure Previously, if "make check" failed, the daemon would be left up, necessitating manual "make kill-daemon" invocation. Now, there is test/cleanup.scm, which does not actually test anything; instead, it kills the daemon (unless =E2=80=98KEEPD=3D1=E2=80=99 is s= pecified). See README. - documentation changes - license now GNU FDL The previous text was a weird conglomeration of old best-practices blurbs (probably). - title now "Guile-PG Manual" Subtitle is the old title: "The (database postgres*) Modules". - index expanded The index has grown by several dozen items. - bootstrap tools upgraded: Guile-BAUX 20150108.1006.f6573e4 GNU Texinfo 5.2 GNU Automake 1.15 GNU gnulib 2015-02-17 05:38:02 GNU Libtool 2.4.6 as before: GNU Autoconf 2.69 Note that SNUGGLE functionality is now provided by Guile-BAUX. tarball and its detached signature in dir: http://download.savannah.gnu.org/releases/guile-pg/ homepage: http://www.nongnu.org/guile-pg/ =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlTq+IMACgkQZwMiJEyAdQKwiACeMGGgKVdnxTxdnB0KQlWDYkIh zZIAn2d7/Q7cM1SAjNzz8Oe14BBqziwc =p2vr -----END PGP SIGNATURE----- --=-=-=--