Byte Escape Syntax

From: Howard Yeh <hayeah(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Byte Escape Syntax
Date: 2010-04-15 17:30:15
Message-ID: t2gab5a379d1004151030pf115817dxb2cd90c6365ed211@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is Postgres's byte escape syntax something that could be set by the client?

I am running into a strange problem when I access postgres try two
different Ruby ORM's. I am guessing that one of them is doing
something funny to the client connections.

Looking at the Ruby C-driver, it's calling PQescapeBytea rather then
PQescapeByteaConn. And tracing PQescapeBytea, sometimes it escapes '\'
as '\\', as describe in the manual, sometimes it doesn't do that
escape. But it always escape the single quote character ' . All the
connections are using UTF-8 encoding.

I wrote my own byte escaping function in Ruby, which does escaping
according to the 8.4 manual, but again it works for some connections,
but not others.

Howard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-04-15 17:45:55 Re: Byte Escape Syntax
Previous Message Kevin Grittner 2010-04-15 17:27:31 Re: Query is stuck