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

Re: [PATCHES] PQescapeBytea documentation patch

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [PATCHES] PQescapeBytea documentation patch
Date: 2001-11-21 12:25:55
Message-ID: 20011121122555.B21102@quartz.newn.cam.ac.uk (view raw or flat)
Thread:
Lists: pgsql-docspgsql-interfacespgsql-patches
On Tue, Nov 20, 2001 at 12:21:00PM -0800, Joe Conway wrote:
> Here's a patch adding documentation for the PQescapeBytea function to 
> libpq.sgml
...
+    <function>PQescapeBytea</function>
+    Escapes a binary string (bytea type) for use within an SQL query.
+    <synopsis>
+     unsigned char *PQescapeBytea(unsigned char *from,
+                                          size_t from_length,
+                                          size_t *to_length);


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))

Cheers,

Patrick

In response to

Responses

pgsql-docs by date

Next:From: Ezra EpsteinDate: 2001-11-21 15:32:04
Subject: Oracle -> PostgreSQL ==> RAW -> ???
Previous:From: Bruce MomjianDate: 2001-11-21 03:17:47
Subject: Re: bytea datatype documentation patch

pgsql-patches by date

Next:From: Tom LaneDate: 2001-11-21 15:06:09
Subject: Re: Rejection of the smallest int8
Previous:From: sugitaDate: 2001-11-21 05:50:28
Subject: Rejection of the smallest int8

pgsql-interfaces by date

Next:From: Chitta BarikDate: 2001-11-21 15:50:37
Subject: closing connection while cancelling
Previous:From: Bell JohnDate: 2001-11-21 03:05:27
Subject: Re: What front end are people using?

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