From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Joe Conway <mail(at)joeconway(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SESSION SESSION - bug or intentional? |
Date: | 2015-09-30 22:08:54 |
Message-ID: | CAKFQuwZALLTuwXg23Pd34vvcd+4o7f6MWPAFt+zfMbUnHwAVtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 30, 2015 at 5:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Wed, Sep 30, 2015 at 2:52 PM, Joe Conway <mail(at)joeconway(dot)com> wrote:
> >> I was looking at something in gram.y when I noticed that the following
> >> production works:
> >> SET SESSION SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;
> >> "SESSION SESSION" seems fairly odd -- is it intentional?
>
> > However, SET SESSION AUTHORIZATION is defined as thus:
> > SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name
>
> Yeah. SET LOCAL SESSION AUTHORIZATION is valid and useful. The optional
> SESSION is just a noise word here, but disallowing it would be
> non-orthogonal compared to other similar syntaxes.
>
While I get the gist of what you are saying the phrase:
"[...] but disallowing it would be non-orthogonal compared to other similar
syntaxes."
doesn't compute for me. You mind trying that again?
I take it that means that disallowing it would be "inconsistent" given
what we allow in similar commands.
Given that conclusion shouldn't the following be modified?
http://www.postgresql.org/docs/devel/static/sql-set-transaction.html
SET [ SESSION | LOCAL ] SESSION CHARACTERISTICS AS TRANSACTION
transaction_mode [, ...]
Both are allowed though the one is redundant and the other (presumably)
ignored, repsectively.
A code comment in the grammar would be warranted at the least - not going
there myself.
I haven't tried to figure out what exactly LOCAL results in if specified
vis-a-vis the presence of absence of an active transcation.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2015-09-30 22:09:07 | Re: No Issue Tracker - Say it Ain't So! |
Previous Message | Christopher Browne | 2015-09-30 22:02:45 | Re: No Issue Tracker - Say it Ain't So! |