Re: proposal - urlencode, urldecode support

From: Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Michael Glaesemann <grzm(at)seespotcode(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - urlencode, urldecode support
Date: 2012-04-25 19:14:52
Message-ID: 20120425191452.GA12571@isc.upenn.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 25, 2012 at 02:41:19PM -0400, Tom Lane wrote:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > 2012/4/25 Michael Glaesemann <grzm(at)seespotcode(dot)net>:
> >> Sounds like a great idea for a PGXN module.
>
> > it is one variant - but with support some web technologies - XML,
> > JSON, I prefer this in core. Urlcode is one the most used code on
> > world now - implementation is simple - and it can be well integrated
> > with decode, encode functions.
>
> Embedding that in encode/decode sounds to me like a pretty horrid idea,
> actually, unless I misunderstand what you are talking about. URL
> encoding is a text-to-text transformation, no? If so, it doesn't fit
> into encode/decode, which presume a binary (bytea) decoded form. People
> would be needing to do entirely bogus text/bytea coercions to use
> such an implementation.

I don't understand the actual proposal here, but urlencoding encodes
octets as quoted us-ascii. So, its not really text to text, but
bytes to US-ASCII and US-ASCII to bytes. AIUI, a unicode character
has no well specified urlencoding. A utf-8 encoded unicode character can
be said to have an urlencoding since we can come up a stream of octets
to urlencode.

Garick

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-04-25 19:21:09 Re: proposal - urlencode, urldecode support
Previous Message Dave Page 2012-04-25 19:03:15 Re: 9.2 release notes, beta time?