Re: Tightening DecodeNumberField's parsing rules

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Evgeniy Gorbanev <gorbanev(dot)es(at)gmail(dot)com>
Subject: Re: Tightening DecodeNumberField's parsing rules
Date: 2025-05-27 19:51:40
Message-ID: CA+TgmoaFoY47AzyCYMF6eHrzZv+ZNUma5hCQHCVGJ+EAHv_7RA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 27, 2025 at 2:38 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> So what I propose we do about this is to apply the attached to HEAD
> and leave the back branches alone.

+1. In most cases, we pride ourselves on carefully validating the
input we receive and people on this list have been known to disparage
other products for failing to do the same. But our validation of
timestamps is notably less strict. I think that's somewhat unavoidable
given that there are multiple date-time formats that somebody might
use, but I'm in favor of not being more lax than we have to be. If
some input can't be interpreted as anything sensible, we should reject
it rather than making up a fake value. However, I agree that it's best
not to do such tightening in the back-branches.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-05-27 20:02:52 Re: Large expressions in indexes can't be stored (non-TOASTable)
Previous Message Melanie Plageman 2025-05-27 19:48:29 Re: Understanding when VM record needs snapshot conflict horizon