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

Re: [HACKERS] \x output blowing up

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] \x output blowing up
Date: 2005-09-27 16:32:14
Message-ID: 200509271632.j8RGWEf10242@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Sat, Sep 24, 2005 at 07:18:16PM -0400, Bruce Momjian wrote:
> > 
> > Well, it seems we are going to have to fix it somehow for 8.1.  It is
> > not crashing here so I can't work up a patch.  Can you submit a minimal
> > fix for 8.1?  Thanks.
> 
> Ah, it would only happen if your encoding was UTF-8 since that's the
> only case psql handles differently. I've attached a patch which fixes
> it. With a bit more rearrangement you could probably simplify it a bit
> but this works.

Fixed. You were right that the use of cell_w was incorrect for
non-numeric values (UTF8), and in fact was just too fragile to use.

I redesigned format_numeric_locale() to return an allocated result,
which removed this problem and simplified the code too.

Patch attached and applied.

-- 
  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

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-09-27 16:36:19
Subject: Re: [HACKERS] BUG #1883: Renaming a schema leaves inconsistent
Previous:From: Josh BerkusDate: 2005-09-27 16:26:49
Subject: Re: State of support for back PG branches

pgsql-patches by date

Next:From: Martijn van OosterhoutDate: 2005-09-27 17:54:44
Subject: Re: [HACKERS] \x output blowing up
Previous:From: Jonathan Beit-AharonDate: 2005-09-27 13:35:04
Subject: Re: Patching dblink.c to avoid warning about open transaction

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