Re: invalidly encoded strings

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: invalidly encoded strings
Дата
Msg-id 878x74kqp8.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: invalidly encoded strings  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.net> writes:

> Tom Lane wrote:
>
>> No.  We have a function overloading system, we should use it.
>>   
> In general I agree with you.
>
> What's bothering me here though is that in the two argument forms, if the first
> argument is text the second argument is the destination encoding, but if the
> first argument is a bytea the second argument is the source encoding. That
> strikes me as likely to be quite confusing, and we might alleviate that with
> something like:
>
>  text convert_from(bytea, name)
>  bytea convert_to(text, name)
>
> But if I'm the only one bothered by it I won't worry.

I tend to agree with you. We should only use overloading when the function is
essentially the same just tweaked as appropriate for the datatype, not when
the meaning is different.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter