Re: Unexpected behaviour of encode()

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unexpected behaviour of encode()
Date: 2013-03-26 18:41:55
Message-ID: CAHyXU0w3_2_os9LgEyZv+V=Owi6bSXKh+Yg7LUpnM8FEyTfHCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 26, 2013 at 1:36 PM, Bill Moran <wmoran(at)potentialtech(dot)com> wrote:
> I get "can't" which is what I'd expect. I would then expect
> encode to escape the ' somehow.

nope -- encode/escape doesn't escape single quotes. it's not designed
to produce output that can be fed directly back into the database (at
least, not without escaping). yes, it (escape format) is pretty
terrible.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-03-26 18:47:38 Re: Unexpected behaviour of encode()
Previous Message Bill Moran 2013-03-26 18:36:04 Re: Unexpected behaviour of encode()