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

From Tom Lane
Subject Re: specifying repeatable read in PGOPTIONS
Date
Msg-id 14183.1391531782@sss.pgh.pa.us
Whole thread Raw
In response to 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:
> PGOPTIONS='-c default_transaction_isolation=serializable' \
>     psql ... -c "SHOW default_transaction_isolation"
> works well enough, but
> PGOPTIONS='-c default_transaction_isolation=repeatable read' \
>     psql ... -c "SHOW default_transaction_isolation"
> doesn't, because of the whitespace. I couldn't come up with any adequate
> quoting.

> I'd like to propose adding aliases with dashes instead of spaces to the
> isolation_level_options array? I'd even like to backport it, because it
> makes benchmarking across versions unneccessarily hard.

-1.  This is not a general solution to the problem.  There are other
GUCs for which people might want spaces in the value.

> Additionally we might want to think about a bit better quoting support
> for such options?

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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: narwhal and PGDLLIMPORT
Next
From: "Erik Rijkers"
Date:
Subject: nested hstore - large insert crashes server