Skip site navigation (1) Skip section navigation (2)

Re: Fwd: Bug#338645: postgresql-contrib-8.1: dbf2pg silently

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martin Pitt <martin(at)piware(dot)de>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Fwd: Bug#338645: postgresql-contrib-8.1: dbf2pg silently
Date: 2005-12-08 18:04:57
Message-ID: 200512081804.jB8I4vs22952@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Patch applied to CVS HEAD and 8.1.X.  Thanks.

---------------------------------------------------------------------------


Martin Pitt wrote:
-- Start of PGP signed section.
> 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(dot)org
> Date: Fri, 11 Nov 2005 20:04:30 +0100
> From: Emanuele Rocca <ema(at)debian(dot)org>
> To: Debian Bug Tracking System <submit(at)bugs(dot)debian(dot)org>
> X-Spam-Status: No, score=0.7 required=4.0 tests=AWL,BAYES_50,
> 	DATE_IN_FUTURE_06_12 autolearn=no version=3.0.3
> 
> Package: postgresql-contrib-8.1
> Severity: normal
> Tags: patch
> 
> Hello,
> according to contrib/dbase/Makefile, iconv support for dbf2pg is 
> disabled.
> If there is no specific reason to do so, it would be really nice to
> uncomment the PG_CPPFLAGS += -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/dbf2pg.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 = (char *) strdup(optarg);
>  				break;
> -#ifdef HAVE_ICONV_H
>  			case 'F':
> +#ifdef HAVE_ICONV_H
>  				charset_from = (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 = (char *) strdup(optarg);
>  				break;
> 
> 
> 
> ----- End forwarded message -----
> 
> -- 
> 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?
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Brent ReidDate: 2005-12-08 21:47:31
Subject: BUG #2102: Backend reports wrong number of affected rows for a table that uses rules
Previous:From: Tom LaneDate: 2005-12-08 16:22:32
Subject: Re: There is a doubt of fatal bug on PostgreSQL 8.0.4.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group