Re: libpq parameter parsing problem

From: Jobin Augustine <jobinau(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: libpq parameter parsing problem
Date: 2020-01-14 06:31:43
Message-ID: CANaTPsr=_2+Ajb-ENdT9QZyk3fjRSrgM+iuZO7vtxe0FU36NGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Michael,

On Tue, Jan 14, 2020 at 11:33 AM Michael Paquier <michael(at)paquier(dot)xyz>
wrote:

> On Mon, Jan 13, 2020 at 08:07:06PM +0530, Jobin Augustine wrote:
> > Sorry for the late reply. Attaching a patch.
>
> > <para>
> > - Percent-encoding may be used to include symbols with special
> meaning in any
> > - of the <acronym>URI</acronym> parts, e.g. replace
> <literal>=</literal> with
> > - <literal>%3D</literal>.
> > -
> > + Connection <acronym>URI</acronym> need to be encoded with
> > + <ulink url="https://en.wikipedia.org/wiki/Percent-encoding">Percent-encoding</ulink>
>
> > + if it includes symbols with special meaning in any of its parts.
> > + For example:
> > +<programlisting>
> > +postgresql://postgres(at)localhost
> :5432/postgres?options=-c%20synchronous_commit%3Doff%20-c%20geqo%3Doff
> > +</programlisting>
> > + where all <literal>=</literal> are replaced with
> <literal>%3D</literal> and
> > + space character with <literal>%20</literal>
> > </para>
>
> The reference to wikipedia is nice to have. A small nit from me is
> that I would group the last sentence with the "For example", to give:
> "Here is an example where all = are replaced.."
>
Yes, agree, readability is better with that modification.
Attaching a modified patch.

> The first sentence sounds good to me.
> --
> Michael
>
Jobin.

Attachment Content-Type Size
libpqURIconnection_v2.diff text/x-patch 988 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vijay Ingle 2020-01-14 07:52:03 Oracle To Community Postgresql Migration
Previous Message Michael Paquier 2020-01-14 06:03:17 Re: libpq parameter parsing problem