Re: specifying repeatable read in PGOPTIONS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: specifying repeatable read in PGOPTIONS
Date
Msg-id 14793.1391533365@sss.pgh.pa.us
Whole thread Raw
In response to Re: specifying repeatable read in PGOPTIONS  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: specifying repeatable read in PGOPTIONS  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: specifying repeatable read in PGOPTIONS
Next
From: "David E. Wheeler"
Date:
Subject: Re: extension_control_path