db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: [jira] Updated: (DERBY-231) "FOR UPDATE" required for updatable result set to work
Date Thu, 03 Nov 2005 22:35:28 GMT
>>>>>>>>>>>> Daniel John Debrunner wrote (2005-11-03 10:44:06):
> According to the SQL standard a statement like SELECT * FROM T is
> updateable, Derby does not make that statement updatable in all cases.
> And by updateable, I mean through positioned updated/delete.

If updatability is not specified, a SELECT * FROM T will be
implicitely read only in the context of a cursor which is insensitive,
scrollable or have an order by clause. Otherwise it is implicitely
updatable. See e.g. ISO/IEC 9075-2:1999, ch 14.1, Syntax Rules ยง10,
p. 652.

> The SQL standard does not require that the client's JDBC result set is
> updateable to make the statement updateable, obviouly because the SQL
> standard is self contained and independent of the JDBC spec.

I would argue that you can not view JDBC and SQL independently and
that a call to executeQuery() would establish such cursor context,
although it will not use only the SQL syntax but also the JDBC API. (I
consider the JDBC spec on level with ISO/IEC 9075-5: Part 5: Host
Language Bindings)

> I'm not disagreeing with your changes, just the removal of the comment.
> Maybe the comment could be updated. You have improved the situation, but
> there are still cases where Derby conflicts with the standard.

I agree that a comment would be useful since this is a bit complicated
(the interpretation of the SQL standard in the contect of JDBC), but I
am not convinced that Andreas' implementation conflicts with the
standard.

-- 
Bernt Marius Johnsen, Database Technology Group, 
Sun Microsystems, Trondheim, Norway

Mime
View raw message