2013-03-10  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.45 (tag v0.45)

2012-12-01  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Avoid overlarge ‘char-set:full’.

	* postgres-qcons.scm: Import SRFI 14 ‘ucs-range->char-set’.
	(string-xrep): If ‘char-set:full’ has more than 256 elements.
	construct and use the charset [0,255], in its place.

2012-04-29  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstraction: RETURN_TRUE

	* gi.h (RETURN_TRUE): New macro.

2012-04-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.44 (tag v0.44)

2012-04-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq] Fix bug: Correctly handle ‘async?’ to ‘pg-get-copy-data’.

	* libpq.c (pg_get_copy_data): Use ‘TRUE_ENOUGH’ for ‘asyncp’.

2012-04-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstraction: TRUE_ENOUGH

	* libpq.c (TRUE_ENOUGH): New macro.
	(pg_getlineasync, pg_notifies): Use ‘TRUE_ENOUGH’.

2012-02-06  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.43 (tag v0.43)

2012-02-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[col-defs] Relax column name lexical rules to disallow whitespace only.

	* postgres-col-defs.scm (validate-def):
	Don't check for ‘char-alphabetic?’, ‘char-numeric?’ or ‘#\_’;
	instead, check only that the character is not whitespace.

2012-02-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Use ‘string-xrep’ more.

	* postgres-qcons.scm (idquote from): New proc.
	(idquote xsub): Likewise.
	(idquote): Use ‘from’, ‘xsub’, ‘string-xrep’.
	(make-SELECT/COLS-tree): Use ‘string-xrep’.
	* postgres-table.scm: Import ‘string-xrep’.
	(pgtable-manager symbol->qstring): Use ‘string-xrep’.
	(pgtable-manager): Likewise.

2012-02-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres-qcons) proc: string-xrep

	* postgres-qcons.scm: Import SRFI 13 ‘string-prefix?’; import SRFI 14
	‘char-set:full’, ‘char-set-filter’, ‘char-set-size’, ‘char-set-union’,
	‘char-set-for-each’, ‘ucs-range->char-set’.
	(string external representation): New titled comment block.
	(string-xrep): New proc, exported.

2012-02-03  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[qcons] Fix bug: Make ‘sql-quote’ do backslash octal substitution.

	* postgres-qcons.scm: Import some SRFI 13 procs.
	(sql-quote): Rename arg to ‘string’; prior to ‘E’ processing,
	replace all ‘#\\’ with the string ‘x#\\’, ‘#\1’, ‘#\3’, ‘#\4’.
	* postgres-types.scm (bytea) <stringifier>: Output single ‘#\\’.

2012-01-29  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Tweak implementation of 1.8+ C->Scheme conversion.

	* libpq.c [!GI_LEVEL_NOT_YET_1_8] (_finangle): New static func.
	[!GI_LEVEL_NOT_YET_1_8] (_FINANGLE): Use ‘_finangle’.

2011-10-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.42 (tag v0.42)

2011-10-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq] Make ‘pg-set-client-encoding!’ also accept a symbol.

	* libpq.c (pg_set_client_encoding_x): If ENCODING
	is a symbol, convert it to a string internally.

2011-10-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq] Make ‘pq-print’ flush its output stream.

	* libpq.c (pg_print): Call ‘fflush’ right after calling ‘PQprint’.

2011-09-29  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.41 (tag v0.41)

2011-09-29  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq doc] Fix bug: Include ‘pg-get-copy-data’ arg ‘async?’ in docstring.

	* libpq.c (pg_get_copy_data): Describe ‘asyncp’ in
	docstring; add docstring option to display it as "async?".

2011-09-29  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq doc] Add "WILL BE REMOVED" to some docstrings.

	* libpq.c (pg_getline, pg_getlineasync):
	Mention planned retirement in docstring.

2011-09-28  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[types] Handle "hex format" for ‘bytea’ objectifier.

	* postgres-types.scm (bytea): In this db-col-type
	objectifier, if the input begins with "\x", take it to be in
	"hex format" and parse it appropriately.  For other input,
	fall back to the traditional "escape format" handling.

2011-09-28  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[doc] Spiff ‘pg-make-print-options’ doc comment.

	* libpq.c (pg_make_print_options): In doc comment,
	use @t around symbols and "---" to separate name from blurb.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres-qcons) fluid: sql-quote-auto-E?

	* postgres-qcons.scm (sql-quote-auto-E?): New fluid, exported.
	(sql-quote): If ‘sql-quote-auto-E?’ is non-‘#f’ and there
	are one or more backslashes in the string, prefix an "E".

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[scheme int] Use ‘zero?’ more.

	* postgres-gxrepl.scm (gxrepl -read): Use ‘zero?’.
	* postgres-resdisp.scm (display-result display-row): Likewise.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[qcons int] Cons less in ‘sql-quote’.

	* postgres-qcons.scm (sql-quote): Accumulate a list of
	range-pairs instead of a list of alternating range components.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Specialize ‘DEFSMOB’ for Guile 1.8+.

	* gi.h (DEFSMOB) [!GI_LEVEL_NOT_YET_1_8]: New macro.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Add abstractions: GCMALLOC, GCFREE, GCRV

	* gi.h (GCMALLOC, GCFREE, GCRV): New macros.
	* libpq.c (xc_free): Use ‘GCFREE’, ‘GCRV’.
	(lob_name): New static var.
	(lob_mklobport): Use ‘GCMALLOC’, ‘lob_name’.
	(lob_free): Use ‘GCFREE’, ‘GCRV’.
	(pg_connectdb): Use ‘GCMALLOC’.
	(sepo_name): Move earlier in file, before ‘sepo_free’; nfc.
	(sepo_free): Don't keep track of size; use ‘free’ directly for
	internal strings; use ‘GCFREE’, ‘sepo_name’, ‘GCRV’.
	(pg_make_print_options): Use ‘GCMALLOC’.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Decruft: (Re)move some obsoleted macros.

	This undoes, in part, the sloggy 2011-06-02, "If
	necessary, #define SCM_{ROCHARS,ROLENGTH,ROUCHARS}".

	* gi.h (SCM_ROCHARS, SCM_ROLENGTH, SCM_ROUCHARS): Delete macros.
	(ROZT_X): Move from here...
	(ROZT): Delete macro.
	* libpq.c [GI_LEVEL_NOT_YET_1_8] (ROZT_X): ...to here.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Add abstraction: NEWCELL_X

	* gi.h (NEWCELL_X): New macro.
	* libpq.c (lob_mklobport): Use ‘NEWCELL_X’.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Specialize ‘pg-getlineasync’ internals for 1.8+.

	* libpq.c (pg_getlineasync) [!GI_LEVEL_NOT_YET_1_8]:
	Fill a temporary buffer then bytewise copy into the Scheme string.

2011-09-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Specialize C-byte-range finangling for Guile 1.8+.

	* libpq.c [!GI_LEVEL_NOT_YET_1_8] (REND, NUL_AT_END_X): New macros.
	(FINANGLABLE_SCHEME_STRING_FROM_SYMBOL, _FINANGLE, UNFINANGLE):
	Bifurcate macros, based on ‘GI_LEVEL_NOT_YET_1_8’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Use ‘FINANGLE’, ‘UNFINANGLE’ more.

	Omission from 2011-09-26, "Add abstractions
	to grok Scheme symbol/string as C byte range".

	* libpq.c (pg_mblen): Use ‘FINANGLE’, ‘UNFINANGLE’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Construct ‘pg-guile-pg-loaded’ rv dynamically; reduce linking.

	* libpq.c (goodies): Delete var.
	(pg_guile_pg_loaded): Rewrite.
	(SIMPLE_SYMBOL, SYM): Delete macros.
	(PQPROTOCOLVERSION, PQRESULTERRORMESSAGE, PQPASS)
	(PQBACKENDPID, PQOIDVALUE, PQBINARYTUPLES, PQFMOD)
	(PQSETNONBLOCKING, PQISNONBLOCKING): Delete SIMPLE_SYMBOLs.
	(init_module): Don't init ‘goodies’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Add abstraction: VALIDATE_KEYWORD

	* gi.h (VALIDATE_KEYWORD): New macro.
	* libpq.c (pg_result_error_field)
	(pg_set_error_verbosity): Use ‘VALIDATE_KEYWORD’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Add abstraction: VALIDATE_EXACT_0_UP_TO_N_COPY

	* gi.h (VALIDATE_EXACT_0_UP_TO_N_COPY): New macro.
	* libpq.c (VALIDATE_FIELD_NUMBER_COPY):
	Use ‘VALIDATE_EXACT_0_UP_TO_N_COPY’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Add abstraction: ASSERT_EXACT_NON_NEGATIVE_COPY

	* gi.h (ASSERT_EXACT_NON_NEGATIVE_COPY): New macro.
	* libpq.c (pg_lo_read): Use ‘ASSERT_EXACT_NON_NEGATIVE_COPY’.
	(pg_getvalue, pg_getlength, pg_getisnull): Likewise.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstraction: ASSERT_EXACT

	* gi.h (ASSERT_EXACT): New macro.
	* libpq.c (pg_lo_seek, pg_mblen): Use ‘ASSERT_EXACT’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq slog] Avoid ‘SCM_VALIDATE_INUM_COPY’.

	* libpq.c (pg_lo_seek): Use ‘EXACTP’ and ‘C_INT’, instead.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstractions to grok Scheme symbol/string as C byte range.

	* libpq.c (range_t): New typedef.
	(RS, RLEN, FINANGLABLE_SCHEME_STRING_FROM_SYMBOL, _FINANGLE)
	(UNFINANGLE, FINANGLE_RAW, FINANGLE): New macros.
	(extract_mode_bits, pg_lo_import, pg_lo_export)
	(VALIDATE_PARAM_RELATED_ARGS, prep_paramspecs, pg_connectdb)
	(pg_escape_string_conn, pg_escape_bytea_conn, pg_unescape_bytea)
	(pg_exec, pg_exec_params, pg_exec_prepared, pg_parameter_status)
	(pg_fnumber, pg_put_copy_data, pg_put_copy_end, pg_putline)
	(option_as_string, pg_make_print_options, pg_mblen)
	(pg_set_client_encoding_x, pg_send_query, pg_send_query_params)
	(pg_send_query_prepared): Use new macros variously.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstraction: option_as_string

	* libpq.c (option_as_string): New static func.
	(pg_make_print_options): Use ‘option_as_string’.

2011-09-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Add abstraction: ASSERT_MODES_COPY

	* libpq.c (extract_mode_bits): New static func.
	(ASSERT_MODES_COPY): New macro.
	(pg_lo_creat, pg_lo_open): Use ‘ASSERT_MODES_COPY’.

2011-09-24  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Assume the system provides <string.h>.

	* libpq.c: #include <string.h> unconditionally.

2011-09-24  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[gi] Move ‘VREF’ to gi.h; bifurcate on ‘GI_LEVEL_NOT_YET_1_8’.

	* gi.h [GI_LEVEL_NOT_YET_1_8]: Move into
	this preproc conditional the #include <guile/gh.h>.
	(BOOLEANP, EXACTP, NULLP, PAIRP, STRINGP, SYMBOLP, PROCEDUREP)
	(BOOLEAN, NUM_INT, NUM_ULONG, SYMBOL, STRING, BSTRING, CHARACTER)
	(C_INT, VECTOR_LEN, VREF, EQ, CONS, CAR, CDR, SETCAR, SETCDR)
	(EVAL_STRING, APPLY, LISTIFY): Likewise, but also
	add a definition for the case of ‘!GI_LEVEL_NOT_YET_1_8’.
	* libpq.c (VREF): Delete macro.

2011-09-24  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[gi] Use ‘STRINGP’ more.

	* gi.h (ASSERT_STRING): Use ‘STRINGP’.

2011-09-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq] Don't do "defer/allow ints" for Guile 1.8+.

	* gi.h (GI_LEVEL, GI_LEVEL_NOT_YET_1_8): New #define:s.
	(NOINTS, INTSOK): Define to nothing if for Guile 1.8+.

2011-09-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[qcons] Fix bug: Special case ‘idquote’ handling of ‘a.*’.

	* postgres-qcons.scm (idquote): If the id has a dot, no array
	notation and the part after the dot is ‘*’, don't double-quote that.

2011-07-09  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Elide macro ‘GH_STONED’.

	* gi.h [!HAVE_GUILE_MODSUP_H] (GH_STONED): Delete macro.
	(PERMANENT): Use ‘scm_permanent_object’.

2011-07-09  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Move macro ‘DEFSMOB’ to gi.h.

	* gi.h (DEFSMOB): New macro.
	* libpq.c (init_module DEFSMOB): Delete macro.

2011-06-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.40 (tag v0.40)

2011-06-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[uninst int] Use $(DESTDIR) more.

	* Makefile.am (uninstall-hook): Use $(DESTDIR) more.

2011-06-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[inst] Zonk useless $(pkglibdir) if ‘USE_CMOD’.

	Probably better would be to teach Automake to DTRT.

	* Makefile.am (install-data-hook) [USE_CMOD]:
	Delete useless ‘$(DESTDIR)$(pkglibdir)’.

2011-06-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C] For consistency, use ‘unsigned long int’ for sepo tag.

	* libpq.c (sepo_type_tag): Change type to ‘unsigned long int’.

2011-06-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C] Paper signed/unsigned wart for ‘PQmblen’ first arg.

	* libpq.c (pg_mblen): Cast first arg of ‘PQmblen’ to ‘void *’.

2011-06-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C] Use ‘ERROR’ more.

	* libpq.c (pg_trace): Use ‘ERROR’.

2011-06-04  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C] Convert auto var ‘FUNC_NAME’ to #define.

	This avoids "unused variable" warnings in newer Guile versions.

	* libpq.c (lob_flush, lob_end_input, lob_seek, lob_fill_input)
	(lob_write): #define FUNC_NAME internally; #undef too.

2011-06-02  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Prefer libpq headers in $(includedir)/postgresql, if available.

	* libpq.c: If <postgresql/libpq-fe.h> is
	available, #include that instead of <libpq-fe.h>;
	likewise <postgresql/libpq/libpq-fs.h> over <libpq/libpq-fs.h>.

2011-06-02  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Don't use assignment expression as ‘SCM_OPFPORTP’ arg.

	* libpq.c (pg_print): Assign to local var
	‘curout’ first; then use it as ‘SCM_OPFPORTP’ arg.

2011-06-02  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] If necessary, #define SCM_{ROCHARS,ROLENGTH,ROUCHARS}.

	* gi.h [!SCM_ROCHARS] (SCM_ROCHARS): New #define.
	[!SCM_ROLENGTH] (SCM_ROLENGTH): Likewise.
	[!SCM_ROUCHARS] (SCM_ROUCHARS): Likewise.

2011-06-02  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[scheme] Use ‘cons*’, not ‘list*’.

	Apparently, ‘list*’ is not cool enough for some Guile versions.

	* postgres-gxrepl.scm (defcc): Use ‘cons*’, not ‘list*’.

2011-05-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Don't clobber Makefile "user vars" ‘CPPFLAGS’, ‘LDFLAGS’.

	* Makefile.am (AM_CPPFLAGS, AM_LDFLAGS): New vars.
	(postgres_la_LDFLAGS): Add $(AM_LDFLAGS).
	(snarfcppopts): Add $(AM_CPPFLAGS).

2011-05-17  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build int] Decruft: Don't bother with ‘scm_gc_protect_object’.

	* gi.h (scm_protect_object): Delete #define.

2011-05-17  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build int] Use ‘AC_CHECK_DECLS’ for ‘scm_terminating’.

	* libpq.c: Throughout, replace ‘defined HAVE_SCM_TERMINATING’
	with ‘HAVE_DECL_SCM_TERMINATING’.

2011-05-17  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[pq int] Use ‘__func__’ more.

	* libpq.c (lob_fill_input, lob_write): Use ‘__func__’.

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build int] Specify ‘ACLOCAL_AMFLAGS’ in Makefile.am.

	* Makefile.am (ACLOCAL_AMFLAGS): New var.

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build install] Installed punified Scheme, sans ".scm" extension.

	* Makefile.am (d_DATA, stamp-all): Do s/schemesource/schemestems/.
	(SUFFIXES): New var.
	(.scm): New old-style suffix rule.
	(install-data-hook): Check for "foo.scm" in $(ddir); emit warning.
	(CLEANFILES): Add $(schemestems).

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[v] Make partial install depend on ../src "make all".

	Omission from 2011-05-14, "Do a partial
	install under test/; point ‘%load-path’ there".

	* Makefile.am (stamp-all): New target.
	(noinst_DATA): New var.
	[MAINTAINER_MODE] (noinst_DATA): Change ‘=’ to ‘+=’.
	(CLEANFILES): Add stamp-all.

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[uninstall] Fix bug: Make sure everything is properly deleted.

	* Makefile.am (update-libsite-module-catalog): New target.
	(install-data-hook) [USE_CMOD]: Use ‘update-libsite-module-catalog’.
	(uninstall-hook): New target.

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build int] Refactor src/Makefile.am slightly.

	* Makefile.am (schemesource, EXTRA_DIST, d_DATA): New vars.
	(dist_d_DATA): Delete var.
	[!USE_CMOD] (d_DATA): Convert assignment from ‘=’ to ‘+=’.
	[MAINTAINER_MODE] (scheme.tsar): Use $(schemesource).

2011-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[qcons int] Avoid using literal symbols with ‘#\#’ in the name.

	These cause round-trip problems that vary from
	one Guile implementation to the next.

	* postgres-qcons.scm (*infix-operations*):
	Use ‘string->symbol’ for symbols named "#", "##", "?#".

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[doc] Spiff docstrings; use ‘-args:’ instead of ‘-sig:’.

	* libpq.c: Throughout, as described above.
	* postgres-col-defs.scm: Likewise.
	* postgres-gxrepl.scm: Likewise.
	* postgres-meta.scm: Likewise.
	* postgres-qcons.scm: Likewise.
	* postgres-resdisp.scm: Likewise.
	* postgres-table.scm: Likewise.
	* postgres-types.scm: Likewise.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[doc int] Use ‘doc:’+comment for ‘PRIMPROC’ docstrings.

	* libpq.c: Throughout, convert series-of-strings
	style docstrings to ‘doc:’+comment style docstrings.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Add abstractions for all gh_ elements.

	* gi.h (BOOLEANP, EXACTP, NULLP, PAIRP, STRINGP, SYMBOLP)
	(PROCEDUREP, BOOLEAN, NUM_INT, NUM_ULONG, SYMBOL, STRING, BSTRING)
	(CHARACTER, C_INT, VECTOR_LEN, EQ, CONS, CAR, CDR, SETCAR, SETCDR)
	(EVAL_STRING, APPLY, LISTIFY): New #define:s.
	(MEMQ): New macro.
	(ROZT_X): Use ‘BSTRING’.
	(PCHAIN): Use ‘LISTIFY’.
	* libpq.c: Use new abstractions, throughout.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Add abstractions: PRIMPROC, STONED, MOD_INIT_LINK_THUNK

	* gi.h (PRIMPROC, STONED, MOD_INIT_LINK_THUNK): New #define:s.
	* libpq.c: Use them, throughout.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build maint] Don't bundle modsup.h; copy 3 macros from it, instead.

	* gi.h [!HAVE_GUILE_MODSUP_H] (GH_DEFPROC): New macro.
	[!HAVE_GUILE_MODSUP_H] (GH_MODULE_LINK_FUNC, GH_STONED): Likewise.
	* modsup.h.snap: Delete file.
	* Makefile.am (EXTRA_DIST): Delete var.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Move guile abstractions from libpq.c to gi.h.

	* libpq.c (NOINTS, INTSOK, GIVENP, NOT_FALSEP, DEFAULT_FALSE)
	(RETURN_FALSE, RETURN_UNSPECIFIED, ASSERT, ASSERT_STRING, ROZT_X)
	(ROZT, MAX_NEWSTRING_LENGTH, SMOBDATA, PCHAIN, ERROR, MEMORY_ERROR)
	(SYSTEM_ERROR, WBPORT): Move from here...
	* gi.h (NOINTS, INTSOK, GIVENP, NOT_FALSEP, DEFAULT_FALSE)
	(RETURN_FALSE, RETURN_UNSPECIFIED, ASSERT, ASSERT_STRING, ROZT_X)
	(ROZT, MAX_NEWSTRING_LENGTH, SMOBDATA, PCHAIN, ERROR, MEMORY_ERROR)
	(SYSTEM_ERROR, WBPORT): ...to here.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Decruft: Don't #define __func__.

	* libpq.c (__func__): Delete #define
	and surrounding preproc conditionals.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build inst] Add support for "no C module" mode.

	* Makefile.am (d_LTLIBRARIES): Conditionalize with ‘USE_CMOD’.
	[!USE_CMOD] (pkglib_LTLIBRARIES, d_DATA): New vars.
	[!USE_CMOD] (postgres.exports, postgres): New targets.
	(install-data-hook): Conditionalize sofix invocation with ‘USE_CMOD’.
	(install-data-hook) [USE_CMOD]: Don't use $(mkmodcat);
	instead, invoke "$(GUILE_TOOLS) make-module-catalog" directly.
	(install-data-hook) [!USE_CMOD]: Add commands to generate
	and install an in-tree Scheme wrapper, if ‘FOR_MAKE_CHECK’ set.
	(DISTCLEANFILES): Add postgres.exports.
	(CLEANFILES): Add postgres.
	* libpq.c (scm_init_database_postgres_module):
	Conditionalize this GH_MODULE_LINK_FUNC with ‘ifdef USE_CMOD’.
	[!USE_CMOD] (guile_pg_init_database_postgres_module): New func.

2011-05-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[int] Rename some libpq.c functions for uniformity.

	U(X) ≡ "Rename from X".
	* libpq.c (pg_lo_creat): U (lob_lo_creat).
	(pg_lo_open): U (lob_lo_open).
	(pg_lo_unlink): U (lob_lo_unlink).
	(pg_lo_get_oid): U (lob_lo_get_oid).
	(pg_lo_tell): U (lob_lo_tell).
	(pg_lo_seek): U (lob_lo_seek).
	(pg_lo_read): U (lob_lo_read).
	(pg_lo_import): U (lob_lo_import).
	(pg_lo_export): U (lob_lo_export).

2011-05-14  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[inst int] Move $(mkmodcat) invocation from top dir to src/.

	* Makefile.am (install-data-hook): Add command
	to make the module-catalog in $(GUILE_LIBSITE).

2011-05-14  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[inst] Decruft: Don't do "upgrade from previous install" actions.

	These are properly the duty of "make uninstall"
	for the previous release.

	* Makefile.am (retired): Delete var.
	(install-data-hook): Don't delete $(ddir)/postgres-sup.*;
	don't delete $(retired) and contents.

2011-05-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build int] Use Guile-BAUX for init snarfing.

	* Makefile.am (SUFFIXES): Delete var.
	(.c.x): Use ‘$(gx) c2x’ instead of $(c2x).

2011-05-03  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Use Guile-BAUX for doc snarfing.

	* Makefile.am: include .../common.mk.
	(dotdocfiles): Delete var.
	(SUFFIXES): Remove .doc.
	(.c.doc, .scm.doc): Delete old-style suffix rules.
	[MAINTAINER_MODE] (BUILT_SOURCES): Remove $(dotdocfiles).
	[MAINTAINER_MODE] (.doc-index): Delete target.
	[MAINTAINER_MODE] (noinst_DATA): Remove .doc-index; add all.tsar.
	[MAINTAINER_MODE] (all.tsar, libpq.tsar, scheme.tsar): New targets.
	(DISTCLEANFILES): Remove *.doc.

2010-11-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres-qcons) proc: idquote

	* postgres-qcons.scm (idquote): New proc, exported.
	(maybe-dq): Use ‘idquote’.

2010-07-19  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Fix bug: Extract documentation from Scheme source.

	Regression introduced 2009-06-21,
	"Minimize "make -C doc/" work in default case".
	* Makefile.am (dotdocfiles): Add $(schemestems:%=%.doc).

2010-06-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C int] Avoid signed/unsigned comparison.

	* libpq.c (lob_fill_input): Simplify ‘lo_read’ rv handling.

2010-06-26  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Sync snapshot files with Guile 1.4.1.119.

	* modsup.h.snap: Sync with Guile 1.4.1.119.

2010-01-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.39 (tag v0.39)

2010-01-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	No longer accept keyword for ‘pg-parameter-status’ PARM arg.

	* libpq.c (pg_parameter_status):
	No longer accept keyword for PARM arg.

2010-01-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Drop procs ‘pg-set-client-data!’, ‘pg-get-client-data’.

	* libpq.c (xc_t): Delete member ‘client’.
	(xc_mark): Update.
	(CONN_CLIENT): Delete cpp macro.
	(pg_connectdb): Update.
	(pg_get_client_data, pg_set_client_data): Delete funcs.

2010-01-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Drop proc ‘pg-lo-get-connection’.

	* libpq.c (lob_lo_get_connection): Delete func.

2010-01-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C int] Add cast to silence compiler warning.

	* libpq.c (pg_mblen): Add cast in call to ‘PQmblen’.

2009-06-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Release: 0.38 (tag v0.38)

2009-06-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Make ‘pg-parameter-status’ accept symbol for PARM.

	* libpq.c (pg_parameter_status): Accept symbol as PARM.

2009-06-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Mention imminent demise of certain procs.

	* libpq.c (lob_lo_get_connection):
	Add "will be removed" notice to docstring.
	(pg_get_client_data, pg_set_client_data): Likewise.

2009-06-21  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Minimize "make -C doc/" work in default case.

	* Makefile.am (schemefrags, schemestems): New vars.
	(dotdocfiles): Delete postgres-resdisp.doc, postgres-types.doc,
	postgres-col-defs.doc, postgres-resx.doc, postgres-qcons.doc,
	postgres-gxrepl.doc, postgres-table.doc, postgres-meta.doc.
	(BUILT_SOURCES): Delete $(dotdocfiles).
	(dist_d_DATA): Use $(schemestems).
	(BUILT_SOURCES) [MAINTAINER_MODE]: Append $(dotdocfiles).

2009-06-21  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[config] Use CPPFLAGS, LDFLAGS directly.

	* Makefile.am (AM_CPPFLAGS): Delete var.
	(postgres_la_LDFLAGS): Remove $(LDFLAGS), $(PQ_LDFLAGS).
	(snarfcppopts): Remove $(AM_CPPFLAGS); add $(DEFAULT_INCLUDES).

2009-06-21  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C int] Update #include:d files.

	* libpq.c: #include "config.h" instead of <config.h>;
	#include <stdlib.h>.

2009-06-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres) proc: pg-server-version

	* libpq.c (pg_server_version): New GH_DEFPROC.

2009-06-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Revert: Support "E-prefixing" for ‘pgtable-manager’ SQL quoting.

	That is the wrong approach.

	* postgres-table.scm: From module (database postgres),
	no longer select ‘pg-result-status’.
	(pgtable-manager): Use ‘sql-quote’ directly.

2009-06-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[qcons] Do single-quote escaping via doubling, per SQL standard.

	* postgres-qcons.scm (sql-quote): Escape single-quote
	by doubling, instead of inserting a backslash prior to, it.

2009-06-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[t-mgr int] For column values, allow keywords to stand for themselves.

	* postgres-table.scm (pgtable-manager ->db-insert-string):
	Pass all keywords through, unchanged.

2009-06-19  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[t-mgr] Recognize #:DEFAULT as column value.

	* postgres-table.scm (pgtable-manager ->db-insert-string):
	For #:DEFAULT, return "DEFAULT".

2009-06-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres) proc: pg-mblen

	* libpq.c (pg_char_to_encoding) [!HAVE_DECL_PG_CHAR_TO_ENCODING]:
	New func decl.
	(encoding_alist): New static data structure.
	(pg_mblen): New GH_DEFPROC.
	(init_module): Init ‘encoding_alist’.

2009-01-05  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Use 1..7 instead of SCM_ARG1..SCM_ARG7.

	* libpq.c (pg_get_copy_data, pg_make_print_options)
	(pg_print, pg_set_notice_out_x): Use 1..7 directly.

2008-11-27  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Use ‘(ftell port)’ instead of ‘(seek port 0 SEEK_CUR)’.

	* libpq.c (lob_lo_tell): Use ‘scm_ftell’.

2008-11-21  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Don't (pretend) to wrap system calls.

	* libpq.c (SYSCALL): Delete macro.
	(pg_trace, pg_untrace, pg_print): Update.

2008-09-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Use ‘(string-null? foo)’ instead of ‘(string=? "" foo)’.

	* postgres-gxrepl.scm (gxrepl -read): Use ‘string-null?’.
	(gxrepl -print): Likewise.
	* postgres-table.scm (pgtable-manager): Likewise.

2008-09-06  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Use ‘size_t’ instead of ‘scm_sizet’.

	* libpq.c (xc_free): Change return value type to ‘size_t’.
	(res_free, sepo_free): Likewise.

2008-08-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Remove support for unused SCM_OUTPORTP.

	* gi.h (SCM_OUTPORTP) [!HAVE_SCM_OUTPORTP]:
	Delete macro and surrounding #ifndef construct.

2008-08-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Hone C internals: Refactor, increase/add abstraction, etc.

	* libpq.c (PROB, NOINTS, INTSOK, GIVENP): New macros.
	(EXACTLY_FALSEP, EXACTLY_TRUEP): Delete macros.
	(DEFAULT_FALSE, RETURN_FALSE, RETURN_UNSPECIFIED): New macros.
	(ASSERT, ASSERT_STRING): New macros.
	(SYSCALL): Rename macro from ‘SCM_SYSCALL’.
	(ROZT_X): Use ‘gh_str2scm’.
	(SMOBDATA, PCHAIN, ERROR): New macros.
	(MEMORY_ERROR, SYSTEM_ERROR, WBPORT): New macros.
	(xc_unbox): Use ‘SMOBDATA’.
	(ASSERT_CONNECTION): Use ‘ASSERT’.
	(CONN_CONN): New macro.
	(xc_name): New static char array (string).
	(xc_display): Rewrite.
	(VALIDATE_CONNECTION_UNBOX_DBCONN): Use ‘ASSERT’ and ‘CONN_CONN’.
	(LOB_CONN): Use ‘CONN_CONN’.
	(LOBPORTP): Use ‘SCM_NIMP’.
	(lob_mklobport, lob_lo_creat, lob_lo_open, lob_lo_unlink): Update.
	(ASSERT_PORT, LOB_STREAM): New macros.
	(lob_lo_get_connection, lob_lo_get_oid, lob_lo_tell, lob_flush)
	(lob_end_input, lob_seek, lob_lo_seek, lob_fill_input, lob_write)
	(lob_lo_read, lob_close, lob_mark, lob_free, lob_lo_import)
	(lob_lo_export, lob_printpt, res_unbox, res_box): Update.
	(VALIDATE_RESULT_UNBOX): Use ‘ASSERT’.
	(res_name): New static cahr array (string).
	(res_display): Rewrite.
	(prep_paramspecs): Use ‘gh_vector_length’; update; call
	‘free’ unconditionally (without checking if its arg is NULL).
	(pg_protocol_version, pg_conndefaults, notice_processor)
	(pg_connectdb, pg_connection_p, pg_finish, pg_reset)
	(pg_set_client_data, pg_escape_string_conn, pg_escape_bytea_conn)
	(pg_unescape_bytea, pg_exec, pg_exec_params, pg_exec_prepared)
	(pg_result_p, pg_result_error_field, pg_error_message, pg_get_db)
	(pg_get_user, pg_get_pass, pg_get_host, pg_get_port, pg_get_tty)
	(pg_get_options, pg_backend_pid, pg_parameter_status)
	(pg_result_status, pg_ntuples, pg_nfields, pg_cmdtuples)
	(pg_oid_value, pg_fnumber): Update.
	(CHECK_TUPLE_COORDS): New macro.
	(pg_getvalue, pg_getlength, pg_getisnull, pg_binary_tuples)
	(pg_put_copy_end, pg_get_copy_data, pg_getline, pg_getlineasync)
	(pg_putline, pg_endcopy, pg_set_error_verbosity, pg_trace)
	(pg_untrace, sepo_unbox): Update.
	(sepo_name): New static byte array (string).
	(sepo_display): Rewrite.
	(pg_make_print_options, pg_print, pg_set_notice_out_x, pg_notifies)
	(pg_set_client_encoding_x, pg_set_nonblocking_x, pg_is_nonblocking_p)
	(pg_send_query, pg_send_query_params, pg_send_query_prepared)
	(pg_get_result, pg_consume_input, pg_is_busy_p, pg_request_cancel)
	(pg_flush, init_module): Update.

2008-08-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Omit port from connection external rep, if host is a socket dir.

	* libpq.c (xc_display): Omit port if host begins with '/'.

2008-08-13  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Make ‘pg-print’ faster: Add fast path for file ports.

	* libpq.c (pg_print): Rework detection for redirect case
	to exclude ports w/ an underlying file descriptor (file ports);
	for those, if the current output-port's has a file descriptor
	and it is the same as stdout's, use that directly, otherwise
	‘dup’ and ‘fdopen’ the current output-port's file descriptor,
	and ‘fclose’ it afterwards.

2008-08-13  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Assume system provides tmpfile(3).

	* libpq.c [!HAVE_TMPFILE]: Don't #include "tmpfile.h";
	don't #define tmpfile to the locally-provided one.
	* Makefile.am (postgres_la_SOURCES): Remove tmpfile.c.
	* tmpfile.h: Delete file.
	* tmpfile.c: Delete file.

2008-08-13  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Consolidate Guile API specification.

	* bcruft.h: Delete file.
	* fcruft.h: Delete file.
	* gi.h: New file.
	* libpq.c: No longer #include <libguile.h> and <guile/gh.h>.
	Instead, #include "gi.h".
	* Makefile.am (postgres_la_SOURCES):
	Add gi.h; remove bcruft.h and fcruft.h.

2008-08-13  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Add infrastructure to more easily tweak GCC warnings for "make all".

	* Makefile.am (AM_CFLAGS): New var.

2008-08-13  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Tweak C code to eliminate some compiler warnings.

	* libpq.c (lob_write): Remove unnecessary cast from ‘void *’.
	Also, use ‘size_t’ for vars involved in computing ‘remaining’.
	(pg_result_error_field): Add ‘default: ;’ to ‘switch’.
	(init_module): Use ‘unsigned int’ for iteration var.

2008-08-12  Thien-Thi Nguyen  <ttn@gnuvola.org>

	C optimization: Make ‘pg-lo-read’ faster.

	* libpq.c (MAX_NEWSTRING_LENGTH): New macro.
	(lob_lo_read): Rewrite.

2008-08-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	GCC annotation: Add __attribute__ ((unused)) for some args.

	* libpq.c (UNUSED): New macro.
	(xc_display, lob_input_waiting_p, res_display, sepo_display): Use it.

2008-08-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Delete degenerate mark functions.

	* libpq.c (res_mark, sepo_mark): Delete funcs.
	(init_module): Don't specify mark funcs for res and sepo smobs.

2008-08-11  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Increase abstraction: Use SCM_{MEMORY,MISC}_ERROR and SCM_SYSERROR.

	* libpq.c (lob_mklobport): Use ‘SCM_MEMORY_ERROR’.
	(lob_lo_creat, lob_lo_open): Use ‘SCM_MISC_ERROR’.
	(lob_flush): Use ‘SCM_SYSERROR’.
	(lob_end_input, lob_seek, lob_fill_input): Use ‘SCM_MISC_ERROR’.
	(lob_write): Use ‘SCM_SYSERROR’.
	(prep_paramspecs, pg_connectdb): Use ‘SCM_MISC_ERROR’.
	(pg_escape_string_conn): Use ‘SCM_SYSERROR’.
	(pg_set_error_verbosity): Use ‘SCM_MISC_ERROR’.
	(pg_trace, pg_untrace, pg_print): Use ‘SCM_SYSERROR’.

2008-08-10  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Drop support for PostgreSQL 7.3.x and earlier.

	* libpq.c: Don't bother w/ INVALIDOID_HEADER.
	Throughout, remove code that does not assume
	HAVE_PQRESULTERRORMESSAGE, HAVE_PQPASS, HAVE_PQBACKENDPID,
	HAVE_PQOIDVALUE, HAVE_PQBINARYTUPLES, HAVE_PQFMOD,
	HAVE_PQPUTNBYTES, HAVE_PQSETNONBLOCKING, HAVE_PQISNONBLOCKING,
	HAVE_PQPROTOCOLVERSION and HAVE_PQFREEMEM, as well as the
	corresponding preprocessor macros (which in some cases makes
	code that does assume those conditions unconditional).
	Remove if-lacking-feature blurb from docstrings.
	(nosupp, noparams) [!HAVE_PQPROTOCOLVERSION]: Delete strings.
	(SORRYNOSUPPORT, SORRYNOPARAMS) [!HAVE_PQPROTOCOLVERSION]: Delete macros.
	(pg_result_error_message, pg_get_pass, pg_backend_pid)
	(pg_oid_value, pg_getvalue, pg_binary_tuples, pg_fmod)
	(pg_putline, pg_set_nonblocking_x, pg_is_nonblocking_p)
	(pg_protocol_version, pg_exec_params, pg_exec_prepared)
	(pg_result_error_field, pg_transaction_status, pg_parameter_status)
	(pg_ftable, pg_ftablecol, pg_fformat, pg_put_copy_data)
	(pg_put_copy_end, pg_get_copy_data, pg_set_error_verbosity)
	(pg_notifies, pg_send_query_params, pg_send_query_prepared)
	(pg_sym_PQRESULTERRORMESSAGE, pg_sym_PQPASS, pg_sym_PQBACKENDPID)
	(pg_sym_PQOIDVALUE, pg_sym_PQBINARYTUPLES, pg_sym_PQFMOD)
	(pg_sym_PQSETNONBLOCKING, pg_sym_PQISNONBLOCKING)
	(pg_sym_PQPROTOCOLVERSION, init_module): Update.

2008-08-10  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Increase abstraction: Define C macros to specify "result format".

	* libpq.c (RESFMT_TEXT, RESFMT_BINARY): New value macros.
	(pg_exec_params, pg_exec_prepared, pg_send_query_params)
	(pg_send_query_prepared): Use ‘RESFMT_TEXT’.

2008-08-10  Thien-Thi Nguyen  <ttn@gnuvola.org>

	C optimization: Declare smob-predicate funcs inline.

	* libpq.c (xc_p, res_p, sepo_p): Declare ‘inline’.

2008-08-08  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Support "E-prefixing" for ‘pgtable-manager’ SQL quoting.

	* postgres-table.scm: From module (database postgres),
	also select ‘pg-result-status’.
	(pgtable-manager): Don't use ‘sql-quote’ directly; instead, init
	at closure-creation time the SQL-quoting procedure that wraps
	‘sql-quote’ to a variant that does "E-prefixing" if the supported
	by the backend.

2008-08-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	New (database postgres-resx) proc: object<-result

	* postgres-resx.scm (object<-result): New proc, exported.

2008-08-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Hide ‘compile-outspec’ implementation details.

	* postgres-table.scm (compiled-outspec?): New object property.
	(compile-outspec): Replace ‘(cons compiled-outspec RV)’
	marking with setting of property ‘compile-outspec?’.
	(compiled-outspec?-extract): Rewrite.

2008-08-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	For ‘pgtable-manager’, validate INSERT column counts.

	* postgres-table (pgtable-manager check-col-count): New proc.
	(pgtable-manager insert-values): Use ‘check-col-count’.
	(pgtable-manager insert-col-values): Likewise.

2008-08-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Make ‘pgtable-manager’ INSERT commands faster.

	* postgres-table.scm (pgtable-manager):
	compute number of columns and type names once.
	(pgtable-manager serial?): Incorporate intneral proc into unique caller.
	(pgtable-manager qstring<-colname): Likewise.
	(pgtable-manager insert-variant): Delete internal proc.
	(pgtable-manager do-insert): New internal proc.
	(pgtable-manager insert-values): Likewise.
	(pgtable-manager insert-col-values): Likewise.
	(pgtable-manager insert-alist): Likewise.
	(pgtable-manager die!): No longer treat ‘insert-alist’,
	‘insert-col-values’ and ‘insert-values’ dynamically.

2008-08-06  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Debogify: Make ‘pgtable-manager’ INSERTs no longer strip ‘serial’ cols.

	* postgres-table.scm (pgtable-manager insert-variant clean-defs):
	Delete internal proc; update callers to elide its call.

2008-08-06  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Make ‘pgtable-manager’ faster.

	* postgres-table.scm: From module (ice-9 common-list),
	select also ‘pick-mappings’.
	(fmt): Incorporate into ‘pgtable-manager’.
	(symbol->qstring, serial? col-defs, drop-proc, create-proc)
	(->db-insert-string, clean-defs, pre-insert-into, insert-values-proc)
	(insert-col-values-cmd, insert-col-values-proc, insert-alist-proc)
	(delete-rows-proc, update-col-proc, select-proc): Likewise.
	(pgtable-manager): Compute each column name's "qstring" only once.

2008-07-17  Thien-Thi Nguyen  <ttn@gnuvola.org>

	C optimization: Declare unboxing funcs inline.

	* libpq.c (xc_unbox, res_unbox, sepo_unbox): Declare ‘inline’.

2008-07-17  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Remove gc- and init-debugging macros.

	* libpq.c (GC_PRINT, INIT_PRINT): Delete macros
	and surrounding pre-processor conditionals.
	(xc_mark, xc_free): Remove ‘GC_PRINT’ call.
	(res_mark, res_free, sepo_mark, sepo_free): Likewise.
	(init_module): Remove ‘INIT_PRINT’ call.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Increase abstraction: Use "cell word 0" for lobport access.

	* libpq.c (LOBPORT_WITH_FLAGS_P): New macro.
	(OPLOBPORTP, OPINLOBPORTP): Use ‘LOBPORT_WITH_FLAGS_P’.
	(lob_mklobport): Use ‘SCM_SET_CELL_WORD_0’.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Increase abstraction: Make ‘res_box’ handle NULL-check.

	* libpq.c (res_box): If given NULL, return Scheme false.
	(pg_exec, pg_exec_params, pg_exec_prepared, pg_send_query): Update.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Inline single-use *_box funcs.

	* libpq.c (xc_box, sepo_box): Delete funcs.
	(pg_connectdb): Use ‘SCM_RETURN_NEWSMOB’ directly.
	(pg_make_print_options): Likewise.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Increase abstraction: Use C macros for smob data access.

	* libpq.c (xc_unbox): Use ‘SCM_SMOB_DATA’.
	(res_unbox, sepo_unbox): Likewise.
	(xc_free): Use ‘SCM_SET_SMOB_DATA’.
	(res_free, sepo_free): Likewise.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Decruft: Elide internal function ‘make_res’.

	* libpq.c (make_res): Delete func;
	convert all callers to use ‘res_box (result)’ instead.

2008-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Use guile.m4 facilities from Guile 1.4.1.118.

	* Makefile.am (install-data-hook): Use $(mkmodcat).

2008-07-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Move Scheme code into src/.

	* postgres-col-defs.scm: Move from ../scm/.
	* postgres-gxrepl.scm: Likewise.
	* postgres-meta.scm: Likewise.
	* postgres-qcons.scm: Likewise.
	* postgres-resdisp.scm: Likewise.
	* postgres-resx.scm: Likewise.
	* postgres-table.scm: Likewise.
	* postgres-types.scm: Likewise.
	* Makefile.am (dotdocfiles): New var.
	(BUILT_SOURCES): Remove libpq.doc; add $(dotdocfiles).
	(dist_d_DATA): New var.
	(.scm.doc): New pattern rule.
	(.doc-index) [MAINTAINER_MODE]: New target.
	(noinst_DATA) [MAINTAINER_MODE]: New var.
	(retired): New variable.
	(install-data-hook): Add check/cleanup for $(retired) files.

2008-07-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	Move C code into src/.

	* bcruft.h: Move from parent dir.
	* fcruft.h: Likewise.
	* modsup.h.snap: Likewise.
	* tmpfile.h: Likewise.
	* tmpfile.c: Likewise.
	* libpq.c: New file, from integrating ../libpostgres.h,
	../libpostgres.c and ../libpostgres_lo.c.
	* Makefile.am: New file.


Copyright (C) 2010, 2011, 2012, 2013 Thien-Thi Nguyen

Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
