From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Nikhil Benesch <nikhil(dot)benesch(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Remove inconsistent quotes from date_part error |
Date: | 2022-01-03 18:35:33 |
Message-ID: | 202201031835.zxrlklgg5z66@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-Jan-03, Tom Lane wrote:
> Attached v3 restores that distinction, and makes some other small
> tweaks. (I found that there were actually a couple of spots in
> date.c that got it backwards, so admittedly this is a fine point
> that not everybody is on board with. But let's make it consistent
> now.)
LGTM.
> @@ -2202,9 +2204,9 @@ time_part_common(PG_FUNCTION_ARGS, bool retnumeric)
> case DTK_ISOYEAR:
> default:
> ereport(ERROR,
> - (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> - errmsg("\"time\" units \"%s\" not recognized",
> - lowunits)));
> + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> + errmsg("unit \"%s\" not supported for type %s",
> + lowunits, format_type_be(TIMEOID))));
I agree that these changes are an improvement.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Chapman Flack | 2022-01-03 18:36:52 | TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING] |
Previous Message | John Naylor | 2022-01-03 18:34:03 | Re: Introducing PgVA aka PostgresVectorAcceleration using SIMD vector instructions starting with hex_encode |