From: | Guido Fiala <guido(dot)fiala(at)dka-gmbh(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: updateable resultset only working for tables? |
Date: | 2004-03-11 13:30:05 |
Message-ID: | 200403111428.13430.guido.fiala@dka-gmbh.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2004-03-11 13:37:29 | Re: updateable resultset only working for tables? |
Previous Message | Kris Jurka | 2004-03-11 13:00:23 | Re: updateable resultset only working for tables? |