Re: Remove inconsistent quotes from date_part error

From: Nikhil Benesch <nikhil(dot)benesch(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove inconsistent quotes from date_part error
Date: 2022-01-03 15:57:47
Message-ID: CAPWqQZSDtV5px+zpQSTtuWHNyf4mUVQzhigrXWtep7_kjhPVXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Updated patch attached.

On Mon, Jan 3, 2022 at 10:26 AM Nikhil Benesch <nikhil(dot)benesch(at)gmail(dot)com> wrote:
>
> On Mon, Jan 3, 2022 at 10:20 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > BTW, if you want to get rid of the quotes, I think that something
> > else has to be done to set off the type name from the rest. In
> > this instance someone might think that we're complaining about a
> > "time zone unit", whatever that is. I suggest swapping it around to
> >
> > units \"%s\" not recognized for type %s
> >
> > Also, personally, I'd write unit not units, but that's
> > more debatable.
>
> Your suggestion sounds good to me. I'll update the patch with that.
>
> Not that it changes anything, I think, but the wording ambiguity you
> mention is present today in the timestamptz error message:
>
> benesch=> select extract('nope' from now());
> ERROR: timestamp with time zone units "nope" not recognized

Attachment Content-Type Size
v2-0001-Improve-unsupported-units-error-for-extract-date_.patch application/octet-stream 15.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-03 15:59:46 Re: Clarify planner_hook calling convention
Previous Message Stanislav Bashkyrtsev 2022-01-03 15:54:49 PostgreSQL stops when adding a breakpoint in CLion