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 16:36:22
Message-ID: 14183.1391531782@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:
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2014-02-04 16:41:06 nested hstore - large insert crashes server
Previous Message Andres Freund 2014-02-04 16:30:46 Re: narwhal and PGDLLIMPORT