Quoting in recovery.conf

Lists: pgsql-hackers
From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Quoting in recovery.conf
Date: 2010-04-06 06:47:10
Message-ID: 4BBAD8EE.7010906@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

To follow up on the discussion here:

http://archives.postgresql.org/pgsql-docs/2010-02/msg00039.php

It seems like a big oversight that there's no way to insert quotes in
strings in recovery.conf. In the long run, the parsing should be done
the same way as postgresql.conf, or the two files be merged altogether,
but right now I think we should just add support for escaping quotes. I
propose two quotes '' to mean a quote mark in the string, like in
strings in SQL queries.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quoting in recovery.conf
Date: 2010-04-06 07:07:37
Message-ID: h2k3f0b79eb1004060007y3eccf1f3oe51235550864ec09@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Apr 6, 2010 at 3:47 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> To follow up on the discussion here:
>
> http://archives.postgresql.org/pgsql-docs/2010-02/msg00039.php
>
> It seems like a big oversight that there's no way to insert quotes in
> strings in recovery.conf. In the long run, the parsing should be done
> the same way as postgresql.conf, or the two files be merged altogether,
> but right now I think we should just add support for escaping quotes. I
> propose two quotes '' to mean a quote mark in the string, like in
> strings in SQL queries.

Agreed. This would be useful for users to specify the application_name
containing a space in the primary_conninfo, for example.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quoting in recovery.conf
Date: 2010-04-06 11:45:29
Message-ID: 1270554329.24910.5875.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2010-04-06 at 16:07 +0900, Fujii Masao wrote:
> On Tue, Apr 6, 2010 at 3:47 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> > To follow up on the discussion here:
> >
> > http://archives.postgresql.org/pgsql-docs/2010-02/msg00039.php
> >
> > It seems like a big oversight that there's no way to insert quotes in
> > strings in recovery.conf. In the long run, the parsing should be done
> > the same way as postgresql.conf, or the two files be merged altogether,
> > but right now I think we should just add support for escaping quotes. I
> > propose two quotes '' to mean a quote mark in the string, like in
> > strings in SQL queries.
>
> Agreed. This would be useful for users to specify the application_name
> containing a space in the primary_conninfo, for example.

+1

--
Simon Riggs www.2ndQuadrant.com


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quoting in recovery.conf
Date: 2010-04-06 16:48:11
Message-ID: 4BBB65CB.7080806@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Simon Riggs wrote:
> On Tue, 2010-04-06 at 16:07 +0900, Fujii Masao wrote:
>> On Tue, Apr 6, 2010 at 3:47 PM, Heikki Linnakangas
>> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>> To follow up on the discussion here:
>>>
>>> http://archives.postgresql.org/pgsql-docs/2010-02/msg00039.php
>>>
>>> It seems like a big oversight that there's no way to insert quotes in
>>> strings in recovery.conf. In the long run, the parsing should be done
>>> the same way as postgresql.conf, or the two files be merged altogether,
>>> but right now I think we should just add support for escaping quotes. I
>>> propose two quotes '' to mean a quote mark in the string, like in
>>> strings in SQL queries.
>> Agreed. This would be useful for users to specify the application_name
>> containing a space in the primary_conninfo, for example.
>
> +1

Ok, here's what I came up with.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
recoveryconf-quote-escapes-1.patch text/x-diff 3.4 KB

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quoting in recovery.conf
Date: 2010-04-07 02:38:41
Message-ID: k2i3f0b79eb1004061938m42a6f197j40125ba8b77fe0ec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Apr 7, 2010 at 1:48 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Ok, here's what I came up with.

Looks OK to me.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quoting in recovery.conf
Date: 2010-04-07 10:59:42
Message-ID: 4BBC659E.7040107@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Fujii Masao wrote:
> On Wed, Apr 7, 2010 at 1:48 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Ok, here's what I came up with.
>
> Looks OK to me.

Committed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com