Re: specifying repeatable read in PGOPTIONS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: specifying repeatable read in PGOPTIONS
Date: 2014-02-04 17:02:45
Message-ID: 14793.1391533365@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-02-04 11:36:22 -0500, Tom Lane wrote:
>> -1. This is not a general solution to the problem. There are other
>> GUCs for which people might want spaces in the value.

> Sure, I didn't say it was. But I don't see any oother values that are
> likely being passed via PGOPTIONS that frequently contain spaces.

application_name --- weren't we just reading about people passing entire
command lines there? (They must be using some other way of setting it
currently, but PGOPTIONS doesn't seem like an implausible source.)

>> Yeah. See pg_split_opts(), which explicitly acknowledges that it'll fall
>> down for space-containing options. Not sure what the most appropriate
>> quoting convention would be there, but I'm sure we can think of something.

> No argument against introducing it. What about simply allowing escaping
> of the next character using \?

The same thought had occurred to me. Since it'll typically already be
inside some levels of quoting, any quoted-string convention seems like
it'd be a pain to use. But a straight backslash-escapes-the-next-char
thing wouldn't be too awful, I think.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2014-02-04 17:07:52 Re: extension_control_path
Previous Message Andres Freund 2014-02-04 16:50:24 Re: specifying repeatable read in PGOPTIONS