Re: outfuncs.c utility statement support

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: outfuncs.c utility statement support
Date: 2017-06-14 03:59:49
Message-ID: bf9482c9-512e-c649-b69a-314087012f38@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/06/14 12:49, Peter Eisentraut wrote:
> On 6/13/17 11:25, Peter Eisentraut wrote:
>> Running with --debug-print-parse=on, executing
>>
>> create table test1 (a int, b text);
>>
>> gives output that is truncated somewhere in the middle (possibly a null
>> byte)
>
> So this seems to be a pretty basic bug. Some node fields of type char
> may be zero, and so printing them as a zero byte just truncates the
> whole output string. This could be fixed by printing chars like strings
> with the full escaping mechanism. See attached patch.

+1. I've been meaning to report about
zero-byte-truncating-the-whole-output-string thing for some time now.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-06-14 04:04:17 Re: pg_receivewal and messages printed in non-verbose mode
Previous Message Peter Eisentraut 2017-06-14 03:53:50 Re: v10beta pg_catalog diagrams