Re: SET TRANSACTION and SQL Standard

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET TRANSACTION and SQL Standard
Date: 2009-01-22 00:41:29
Message-ID: 200901220041.n0M0fTg24091@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > On Fri, 2009-01-09 at 16:14 +0200, Peter Eisentraut wrote:
> >> Simon Riggs wrote:
> >>> I notice that we allow commands such as
> >>>
> >>> SET TRANSACTION read only read write read only;
> >>>
> >>> BEGIN TRANSACTION read only read only read only;
> >>>
> >>> Unsurprisingly, these violate the SQL Standard:
> >>> * p.977 section 19.1 syntax (1)
> >>> * p.957 section 17.3 syntax (2)
> >> Well, we allow a lot of things. Violations of the SQL standard happen
> >> when a command that appears in the standard doesn't do what the standard
> >> says. Allowing commands that are not in the standard is not a violation.
> >
> > Except when the standard explicitly forbids it, as with the above.
>
> No, it just means that the statement "SET TRANSACTION read only read
> write read only;" doesn't conform to the standard, and it's therefore
> implementation-dependent what it does. See the meaning of "shall" in
> Syntax Rules, section "6.3.3.2 Terms denoting rule requirements".
>
> I agree with Tom that the 2nd form is harmless, but we should throw an
> error for the first.

Added to TODO:

Prevent the specification of conflicting transaction read/write
options

* http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-01-22 00:47:02 Re: Pluggable Indexes
Previous Message Bruce Momjian 2009-01-22 00:08:03 Re: Pluggable Indexes (was Re: rmgr hooks (v2))