dbTalk Databases Forums  

[BUGS] Fwd: Bug#338645: postgresql-contrib-8.1: dbf2pg silently ignores the -F and -T options

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Fwd: Bug#338645: postgresql-contrib-8.1: dbf2pg silently ignores the -F and -T options in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Pitt
 
Posts: n/a

Default [BUGS] Fwd: Bug#338645: postgresql-contrib-8.1: dbf2pg silently ignores the -F and -T options - 11-20-2005 , 09:33 AM







--H+4ONPRPur6+Ovig
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi PostgreSQL developers!

I recently received the Debian bug report below about missing iconv
support for the dbf2pg contrib module.

The submitter created a patch which replaces the silent ignoring of -F
(when iconv support is disabled) with a meaningful warning.

Do you consider applying this upstream?

Thanks!

Martin

----- Forwarded message from Emanuele Rocca <ema (AT) debian (DOT) org> -----

Subject: Bug#338645: postgresql-contrib-8.1: dbf2pg silently ignores the -F=
and -T options
Reply-To: Emanuele Rocca <ema (AT) debian (DOT) org>, 338645 (AT) bugs (DOT) debian.org
Date: Fri, 11 Nov 2005 20:04:30 +0100
=46rom: Emanuele Rocca <ema (AT) debian (DOT) org>
To: Debian Bug Tracking System <submit (AT) bugs (DOT) debian.org>
X-Spam-Status: No, score=3D0.7 required=3D4.0 tests=3DAWL,BAYES_50,
DATE_IN_FUTURE_06_12 autolearn=3Dno version=3D3.0.3

Package: postgresql-contrib-8.1
Severity: normal
Tags: patch

Hello,
according to contrib/dbase/Makefile, iconv support for dbf2pg is=20
disabled.
If there is no specific reason to do so, it would be really nice to
uncomment the PG_CPPFLAGS +=3D -DHAVE_ICONV_H line, so that dbf2pg can
convert charsets properly.

Moreover, the user is not informed about lack of iconv support, and that
causes a lot of problems trying to understand why there is no charset
conversion even passing -F (and -T) to the command line.

The attached patch prints a warning if there is no iconv support and the
user passes the -F option.

Thanks!

--- /home/ema/debian/postgresql-8.1-8.1.0/postgresql-8.1.0/contrib/dbase/db=
f2pg.c 2005-10-15 04:49:04.000000000 +0200
+++ dbf2pg.c 2005-11-11 19:43:50.000000000 +0100
@@ -618,10 +618,14 @@
case 'U':
username =3D (char *) strdup(optarg);
break;
-#ifdef HAVE_ICONV_H
case 'F':
+#ifdef HAVE_ICONV_H
charset_from =3D (char *) strdup(optarg);
+#else
+ printf("WARNING: dbf2pg was compiled without iconv support, ignoring -=
F option\n");
+#endif
break;
+#ifdef HAVE_ICONV_H
case 'T':
charset_to =3D (char *) strdup(optarg);
break;



----- End forwarded message -----

--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

--H+4ONPRPur6+Ovig
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDgJcLDecnbV4Fd/IRAuQ0AKCNO/FNTDbUny7kq0fzr8KcJLPjlwCePWwL
+Bbc25S4tu6pR3oGPiw0IiY=
=fS0e
-----END PGP SIGNATURE-----

--H+4ONPRPur6+Ovig--

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.