db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: how to get names of column constraints ?
Date Fri, 09 May 2008 18:23:14 GMT
Maris Orbidans <maris.orbidans@ingg.com> writes:

> Yes, please run attached class.

Thanks, Maris, I can reproduce your problem. I think the issue here is
that in Derby, an index may support more than one constraint, so there
is not necessarily a one-to-one relationship here. 

So I am not convinced that the assumption than HA-JDBC makes here is
warranted. It would seem that JDBC should have supported a
getConstraintInfo call also...

In the case of the primary key, there is no named constraint, so
Derbys underlying index name ("SQL<big number>") is used as a
constraint name (and you can thus drop it). In the named constraint
case, the underlying index name is not exposed and the drop fails. I
agree this seems a bit un-orthogonal.

Does anyone have more insight on this?

Dag

Mime
View raw message