On Mon, Oct 26, 2009 at 11:33:40PM +0000, Roger Leigh wrote:
> On Mon, Oct 26, 2009 at 07:19:24PM -0400, Tom Lane wrote:
> > Roger Leigh <rleigh@codelibre.net> writes:
> > > On Mon, Oct 26, 2009 at 01:33:19PM -0400, Tom Lane wrote:
> > >> Yeah. We can do what we like with the UTF8 format but I'm considerably
> > >> more worried about the aspect of making random changes to the
> > >> plain-ASCII output.
> >
> > > I checked (using strace)
> > > gnumeric (via libgda and gnome-database-properties)
> > > openoffice (oobase)
> >
> > Even if that were the entire universe of programs we cared about,
> > whether their internal ODBC logic goes through psql isn't really
> > the point here. What I'm worried about is somebody piping the
> > text output of psql into another program.
> >
> > > On a related note, there's something odd with the pager code.
> >
> > Hm, what platform are you testing that on?
>
> Debian GNU/Linux (unstable)
> linux 2.6.30
> eglibc 2.10.1
> libreadline6 6.0.5
> libncurses5 5.7
> gcc 4.3.4
>
> This is the trace of the broken write:
>
> 16206 write(1, " Name \342\224\202 Owner \342\224"..., 102) = 102
> 16206 write(1,
"\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342
> \224"..., 256) = 256
> 16206 write(1, "\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\n", 18) = 18
Further tracing showed this to be a bug in the "util-linux" version of
"more" which had a static 256 byte line buffer. The above was a red
herring--it's writing to a pipe. I've sent a patch to fix this by
increasing the buffer size.
-- .''`. Roger Leigh: :' : Debian GNU/Linux http://people.debian.org/~rleigh/`. `' Printing on
GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.