Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group