Am Donnerstag, 11. März 2004 14:00 schrieb Kris Jurka:
> > Is there a way to tell the driver the primary keys manually (as i know
> > them at this point in my code) for a certain ResultSet/Statement or
> > another solution to this problem?
>
> How would you propose providing this information to the driver? If you
I would tell it this way maybe:
ResultSet.setPrimaryKeys(String[] pks);
After this the driver should trust me and simply go on.
Now how do i know about the primary keys? Well - i can whether define a
certain naming scheme for my application
-or-
am more nice and general solution would be to massage postgres
system-catalogues until i get a view containing the primary keys of a view.
The "algorithm" is easily written, but not as easy to do, i know...
If we would end up with a select-statement which holds all the primary keys of
all tables used in a view (recursively) with their alias-names it would just
be the right thing. Yes? No?
> have the primary key columns, you should also have the non-pk columns
> making an update simple. You're just going to have to bite the
> bullet on this one and either avoid the view or write an update statement
> yourself.
So it looks now...
Guido