3 ms·
Informative replies, thank you. > 1) You can write a function which determines whether a zipcode_id matches the constraint and check on that, or Ah, this old
by jacques_chester 15y ago
Informative replies, thank you.
> 1) You can write a function which determines whether a zipcode_id matches the constraint and check on that, or
Ah, this old chestnut. Been there, written the PL/SQL trigger, got the t-shirt. Agreed that there isn't a purely declarative approach here.
> You can't just index the path.
Postgres might be the winner here, if someone sufficiently motivated came along and wrote a custom index type for this use case.