[Nitro] Problem with forgien key constraints

itsme213 itsme213 at hotmail.com
Fri Feb 17 21:55:01 EST 2006



> The new patch that alters join table names has highlighted a problem
> with the foreign key constraints system. The problem is PostgreSQL
> doesn't like very long constraint names.

Standard library abbrev seems to give short unambiguous name prefixes.

irb(main):003:0> require 'abbrev'
=> true
irb(main):004:0> ['abc', 'abcde', 'pqr'].abbrev
=> {"pq"=>"pqr", "abc"=>"abc", "p"=>"pqr", "pqr"=>"pqr", "abcd"=>"abcde", 
"abcde"=>"abcde"}
irb(main):005:0>

Would that help?



More information about the Nitro-general mailing list