Re: Remove inconsistent quotes from date_part error

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Remove inconsistent quotes from date_part error
Дата
Msg-id 202201031835.zxrlklgg5z66@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Remove inconsistent quotes from date_part error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: Introducing PgVA aka PostgresVectorAcceleration using SIMD vector instructions starting with hex_encode
Следующее
От: Chapman Flack
Дата:
Сообщение: TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]