Re: COPY fails on 8.1 with invalid byte sequences in text

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: COPY fails on 8.1 with invalid byte sequences in text
Дата
Msg-id 454B8AA5.60608@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: COPY fails on 8.1 with invalid byte sequences in text  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane skrev:

>> Is this not a bug?
>
> I don't actually see that it is.  The documentation is perfectly clear
> on the point:
>
>     (It is your responsibility that the byte sequences you create
>     are valid characters in the server character set encoding.)
>
> (This is in 4.1.2.1. String Constants)  If you don't want to deal with
> this, don't use octal escapes to construct multibyte characters.

The database also has a responsibility to protect itself. If you can
insert data into the database so that the stored value is invalid for
the datatype of the column, then it's broken imho.

Having a statement in the doc saying "please don't do this because you
will corrupt the data" doesn't really make the situation better.

/Dennis

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [HACKERS] bug in timestamp and out of range values
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: COPY fails on 8.1 with invalid byte sequences in text