Re: [PATCH] Patch to fix a crash of psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Patch to fix a crash of psql
Date
Msg-id 12977.1354289766@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Patch to fix a crash of psql  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [PATCH] Patch to fix a crash of psql  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 11/30/12 3:26 AM, Albe Laurenz wrote:
>> If there is no possibility for false positives, I'd say
>> that the "possible" should go.  Maybe it should even be
>> an error and no warning then.

> Yes, encoding mismatches are generally an error.

> I think the message should be more precise.  Nobody will know what an
> "encoding conflict" is.  The error condition is "last multibyte
> character ran over end of file" or something like that, which should be
> clearer.

TBH I think that a message here is unnecessary; it's sufficient to
ensure psql doesn't crash.  The backend will produce a better message
than this anyway once the data gets there, and that way we don't have to
invent a new error recovery path inside psql.  As-is, the patch just
creates the question of what to do after issuing the error.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: json accessors
Next
From: Tom Lane
Date:
Subject: Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?