Re: [PATCH] bugfix for int2vectorin

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Caleb Welton <cwelton(at)greenplum(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] bugfix for int2vectorin
Date: 2009-12-28 08:22:14
Message-ID: 603c8f070912280022o1916ba1eh1ab0089e2dc81a2e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 2, 2009 at 2:59 PM, Caleb Welton <cwelton(at)greenplum(dot)com> wrote:
> New patch attached:
>
> 1. Does not add a new error message (though the pg_atoi's error message is a
> little goofy looking).
> 2. Handles int2 overflow cases.
> 3. oidvectorin does NOT suffer from the same problems as int2vectorin,
> someone already fixed it.
>
> As for the use-case I'm not completely sure... I'm not an end-user, I'm just
> responding to a bug report.
>
> My stance here is that returning an error (even a bad error) on trying to
> convert data in is better
> doing  something "wrong" with bogus input.  In the first case a user
> scratches their head, maybe
> files a bug report, you tell them the correct syntax and they go on.  In the
> second case they input
> a bunch of data and then start complaining about "data corruption", "loss of
> data", etc. and the
> support case is 100x worse.
>
> The amount of code we are talking about here is less than 5 lines of code...

I have scrutinized the latest version of this patch and I feel that it
is a modest improvement on the status quo and that there is really no
downside. Absent strong objections, I will commit it later this week.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2009-12-28 09:07:16 Re: Application name patch - v3
Previous Message Pavel Stehule 2009-12-28 08:04:23 Re: info about patch: using parametrised query in psql