Date: Tue, 27 Jul 2004 10:23:32 -0400 From: Joe Marcus Clarke <marcus@marcuscom.com> To: Richard Schilling <rschi@rsmba.biz> Cc: FreeBSD GNOME Users <gnome@freebsd.org> Subject: Re: Patch suggestion for gnucash 1.8.8 (ports/finance/gnucash) postgres backend. Message-ID: <1090938212.3873.33.camel@shumai.marcuscom.com> In-Reply-To: <4105C543.4070207@rsmba.biz> References: <4105C543.4070207@rsmba.biz>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1090938212.3873.33.camel>