Re: Metadata for tables, schema, and numeric - Mailing list pgsql-jdbc

From Peter Eisentraut
Subject Re: Metadata for tables, schema, and numeric
Date
Msg-id Pine.LNX.4.30.0107051816470.677-100000@peter.localdomain
Whole thread Raw
In response to Re: Metadata for tables, schema, and numeric  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Metadata for tables, schema, and numeric
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: Gunnar Rønning
Date:
Subject: Re: Re: [INTERFACES] New code for JDBC driver
Next
From: "Ëζ¬Éú"
Date:
Subject: Where have the laterest jdbc driver fro download ?