Re: Is select a transaction starting statement? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Is select a transaction starting statement?
Date
Msg-id 20040914175734.GA9752@dcc.uchile.cl
Whole thread Raw
In response to Is select a transaction starting statement?  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: Is select a transaction starting statement?  (Dennis Bjorklund <db@zigo.dhs.org>)
List pgsql-hackers
On Tue, Sep 14, 2004 at 07:35:29PM +0200, Dennis Bjorklund wrote:
> Is select a transaction starting statement according to the the sql
> specification?

Yes, at least in my copy of sql2003.

> In the specification (sql99) there is a list of things that are and a list
> of things that are not, but I can't figure out which list a select query
> belongs to. Isn't that great :-)

In SQL2003-5WD I see:

4.33.4 SQL-statements and transaction states

The following SQL-statements are transaction-initiating SQL-statements,
i.e., if there is no current SQLtransaction, and a statement of this
class is executed, an SQL-transaction is initiated:

[...]

-- The following SQL-data statements:  [...]  <direct select statement: multiple rows>.  [...]


The <direct select statement: multiple rows> is in time defined as
<cursor specification>, which in turn is a <query expression>, which is
our SELECT statement.  A lot of jumps in the grammar, but it's there.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: Gaetano Mendola
Date:
Subject: NEW used in a query that is not in a rule