Re: Add header support to text format and matching feature

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Add header support to text format and matching feature
Дата
Msg-id 7ef90152-32e2-4f4b-9010-329a8dcc0c95@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Add header support to text format and matching feature  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Add header support to text format and matching feature  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
    Julien Rouhaud wrote:

> Maybe that's just me but I understand "not supported" as "this makes
> sense, but this is currently a limitation that might be lifted
> later".

Looking at ProcessCopyOptions(), there are quite a few invalid
combinations of options that produce
ERRCODE_FEATURE_NOT_SUPPORTED currently:

- HEADER in binary mode
- FORCE_QUOTE outside of csv
- FORCE_QUOTE outside of COPY TO
- FORCE_NOT_NULL outside of csv
- FORCE_NOT_NULL outside of COPY FROM
- ESCAPE outside of csv
- delimiter appearing in the NULL specification
- csv quote appearing in the NULL specification

FORCE_QUOTE and FORCE_NOT_NULL are options that only make sense in one
direction, so the errors when using these in the wrong direction are
comparable to the "HEADER MATCH outside of COPY FROM" error that we
want to add. In that sense, ERRCODE_FEATURE_NOT_SUPPORTED would be
consistent.

The other errors in the list above are more about the format itself,
with options that make sense only for one format. So the way we're
supposed to understand ERRCODE_FEATURE_NOT_SUPPORTED in these
other cases is that such format does not support such feature,
but without implying that it's a limitation.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



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

Предыдущее
От: Przemysław Sztoch
Дата:
Сообщение: Re: [PATCH] Completed unaccent dictionary with many missing characters
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Small TAP improvements