Re: [PATCHES] PQescapeBytea documentation patch

From: Joe Conway <joseph(dot)conway(at)home(dot)com>
To: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [PATCHES] PQescapeBytea documentation patch
Date: 2001-11-21 17:04:41
Message-ID: 3BFBDEA9.3070703@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-interfaces pgsql-patches

Patrick Welche wrote:

> This makes me wonder: should libpq contain a function to do the opposite
> too? eg.
>
> string=GetValue(from a bytea type column)
> PQunescapeBytea(string, some buffer, buffer's size)
>
> - or is there already another way of doing it?
>
> It seems to me that anyone using bytea with libpq will end up having
> to reinvent this wheel. (Something worthy of being knocked up in my
> Copious Free Time (tm))

I thought about that, but did not write it for a couple of reasons:

First, there wasn't a strong consensus that this type of function
belonged as part of libpq in the first place, so I didn't want to push
my luck ;-)

Second, at least in my current work, I'm using binary cursors, in which
case no unescaping is necessary.

I do agree that a standard bytea unescape function should be available
in the client library somewhere. Maybe for 7.3 . . .

Joe

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Joe Conway 2001-11-21 17:12:13 Re: Oracle -> PostgreSQL ==> RAW -> ???
Previous Message Ezra Epstein 2001-11-21 15:32:04 Oracle -> PostgreSQL ==> RAW -> ???

Browse pgsql-interfaces by date

  From Date Subject
Next Message Darko Prenosil 2001-11-21 18:41:20 TTY debug
Previous Message Chitta Barik 2001-11-21 15:50:37 closing connection while cancelling

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-11-21 17:54:31 Re: Rejection of the smallest int8
Previous Message Bruce Momjian 2001-11-21 16:49:04 Re: [PATCHES] Version checking when loading psql