Skip site navigation (1) Skip section navigation (2)

Re: Metadata for tables, schema, and numeric

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ola Sundell <ola(at)miranda(dot)org>, Mike Finn <mike(dot)finn(at)tacticalExecutive(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Metadata for tables, schema, and numeric
Date: 2001-07-05 16:20:55
Message-ID: Pine.LNX.4.30.0107051816470.677-100000@peter.localdomain (view raw or flat)
Thread:
Lists: 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(at)gmx(dot)net   http://funkturm.homeip.net/~peter


In response to

Responses

pgsql-jdbc by date

Next:From: egcsDate: 2001-07-06 02:15:58
Subject: Where have the laterest jdbc driver fro download ?
Previous:From: Gunnar RønningDate: 2001-07-05 10:23:27
Subject: Re: Re: [INTERFACES] New code for JDBC driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group