Re: Bytea/Base64 encoders for libpq - interested?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <joseph(dot)conway(at)home(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, Joerg Hessdoerfer <Joerg(dot)Hessdoerfer(at)sea-gmbh(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bytea/Base64 encoders for libpq - interested?
Date: 2001-09-04 22:58:21
Message-ID: Pine.LNX.4.30.0109050054260.828-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2001-09-04 23:09:17 Re: Bytea/Base64 encoders for libpq - interested?
Previous Message Tom Lane 2001-09-04 22:56:06 Re: Bytea/Base64 encoders for libpq - interested?

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2001-09-04 23:09:17 Re: Bytea/Base64 encoders for libpq - interested?
Previous Message Tom Lane 2001-09-04 22:56:06 Re: Bytea/Base64 encoders for libpq - interested?