Tom Lane writes:
> While I haven't read the JDBC spec, I'd have to guess that the entire
> notion of an updateable result set is defined only for a very small
> subset of possible SELECT queries
FYI:
| Due to differences in database implementations, the JDBC API does not
| specify an exact set of SQL queries which must yield an updatable result
| set for JDBC drivers that support updatability. Developers can, however,
| generally expect queries which meet the following criteria to produce an
| updatable result set:
|
| 1. The query references only a single table in the database.
| 2. The query does not contain any join operations.
| 3. The query selects the primary key of the table it references.
|
| In addition, an SQL query should also satisfy the conditions listed
| below if inserts are to be performed.
|
| 4. The query selects all of the non-nullable columns in the
| underlying table.
| 5. The query selects all columns that don't have a default value.
I would argue that a minority of all queries in real life statisfy 1.
through 3, in addition to the restriction of not using functions.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter