Re: Bytea/Base64 encoders for libpq - interested? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Bytea/Base64 encoders for libpq - interested?
Date
Msg-id Pine.LNX.4.30.0109050054260.828-100000@peter.localdomain
Whole thread Raw
In response to Re: Bytea/Base64 encoders for libpq - interested?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Log rotation?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Log rotation?