From owner-freebsd-gnome@FreeBSD.ORG Tue Jul 27 14:23:42 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 757F916A4D2 for ; Tue, 27 Jul 2004 14:23:41 +0000 (GMT) Received: from creme-brulee.marcuscom.com (rrcs-midsouth-24-172-16-118.biz.rr.com [24.172.16.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0052343D49 for ; Tue, 27 Jul 2004 14:23:41 +0000 (GMT) (envelope-from marcus@marcuscom.com) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) i6REMetk092505; Tue, 27 Jul 2004 10:22:40 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Richard Schilling In-Reply-To: <4105C543.4070207@rsmba.biz> References: <4105C543.4070207@rsmba.biz> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-oGfkqUh3/dTw2EdhTS/G" Organization: MarcusCom, Inc. Message-Id: <1090938212.3873.33.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 27 Jul 2004 10:23:32 -0400 X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on creme-brulee.marcuscom.com cc: FreeBSD GNOME Users Subject: Re: Patch suggestion for gnucash 1.8.8 (ports/finance/gnucash) postgres backend. X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 14:23:43 -0000 --=-oGfkqUh3/dTw2EdhTS/G Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2004-07-26 at 23:00, Richard Schilling wrote: > I have created a patch that you can put into the "files" subdirectory of=20 > the gnucash port. It's attached. >=20 > Gnucash, when creating a database for the Postgres backend uses the=20 > value returned from nl_langinfo(CODESET) to build up SQL queries. In=20 > particular the value returned from nl_langinfo(CODESET) is used to set=20 > the encoding in the Postgres database in the following SQL command: >=20 > CREATE DATABASE gnucash_database_name WITH ENCODING 'US-ASCII'; >=20 > nl_langinfo(CODESET) returns the string "US-ASCII" on my BSD system.=20 > When US-ASCII is used to build up SQL queries for the Postgres backend,=20 > Postgres generates an error because "US-ASCII" is not allowed to be used=20 > as an option in Postgres SQL. >=20 > Would you be willing to Patch the gnucash code to substitute US-ASCII=20 > with SQL_ASCII as it is used? The effected file is: >=20 > work/gnucash-1.8.8/src/backend/postgres/PostgresBackend.c, line 2100. Committed, thanks. Joe >=20 >=20 > Thanks. >=20 > Richard Schilling > (206) 774-5951 >=20 >=20 >=20 >=20 > ______________________________________________________________________ > *** src/backend/postgres/PostgresBackend.orig Mon Jul 26 17:17:45 2004 > --- src/backend/postgres/PostgresBackend.c Mon Jul 26 17:33:16 2004 > *************** > *** 2104,2109 **** > --- 2104,2114 ---- > if (!strcmp (encoding, "ANSI_X3.4-1968")) > encoding =3D "SQL_ASCII"; > =20 > + if (!strcmp(encoding, "US-ASCII")) > + encoding =3D "SQL_ASCII"; > +=20 > + printf("\nDatabase encoding is: %s.\n", encoding); > +=20 > /* create the database */ > p =3D be->buff; *p =3D0; > p =3D stpcpy (p, "CREATE DATABASE "); >=20 > ______________________________________________________________________ > _______________________________________________ > freebsd-gnome@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-gnome > To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org" --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-oGfkqUh3/dTw2EdhTS/G Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBBmVkb2iPiv4Uz4cRAl2iAKCutSk6qfA+xLfIWC/eGEvuDw8WCACgiC5U srKOJAiwZRB/bfY7LHNRy4A= =f79B -----END PGP SIGNATURE----- --=-oGfkqUh3/dTw2EdhTS/G--