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

Re: Bytea/Base64 encoders for libpq - interested?

From: "Joe Conway" <joseph(dot)conway(at)home(dot)com>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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 03:25:29
Message-ID: 009701c134f1$3fe799b0$0705a8c0@jecw2k1 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> I don't think adding a datatype just to provide base64 encoding is
> a wise approach.  The overhead of a new datatype (in the sense of
> providing operators/functions for it) will be much more than the
> benefit.  I think providing encode/decode functions is sufficient...
> and we have those already, don't we?
>

It might be nice to have a PQbyteaEscape or some such function available in
the libpq client library so that arbitrary binary could be escaped on the
client side and used in a sql statement. I actually wrote this already as an
addition to the PHP PostgreSQL extension, but it would make more sense, now
that I think about it, for it to be in libpq and called from PHP (or
whatever). Comments?

On a related note, are there any other bytea functions we should have in the
backend before freezing for 7.2? I was thinking it would be nice to have a
way to cast bytea into text and vice-versa, so that the normal text
functions could be used for things like LIKE and concatenation. Any interest
in this? If so, any guidance WRT how it should be implemented?

-- Joe



In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-09-04 04:12:35
Subject: Re: Bytea/Base64 encoders for libpq - interested?
Previous:From: Bruce MomjianDate: 2001-09-04 03:19:19
Subject: Re: Re: Toast,bytea, Text -blob all confusing

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-09-04 04:12:35
Subject: Re: Bytea/Base64 encoders for libpq - interested?
Previous:From: Bruce MomjianDate: 2001-09-04 02:57:48
Subject: Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal

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