Re: Bytea/Base64 encoders for libpq - interested?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Bytea/Base64 encoders for libpq - interested?
Дата
Msg-id Pine.LNX.4.30.0109050054260.828-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Bytea/Base64 encoders for libpq - interested?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> > I agree that it would be better to *not* allow implicit coercions. Given
> > that, any preferences on function names? Are text_to_bytea() and
> > bytea_to_text() too ugly?
>
> They're pretty ugly, but more importantly they're only suitable if we
> have exactly one conversion function each way.  If we have two, what
> will we call the second one?

Why not just stick these things into encode() and name them
"my-cool-encoding" or whatever.  There is no truly natural conversion
between text and bytea, so encode/decode seem like the proper place.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Log rotation?
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Log rotation?