>> Otherwise you could make this check in postgres using the CHECK
>> expression table/column constraint. And possibly some stored
>> procedures. But we're then writing very close to the database layer.
>> And not even our current database layer, as I don't know if mysql
>> supports this.
>
> i don't think postgres supports a check constraint on a column in a
> different table linked by foreign key. at least, if it does they're
> keeping quiet about it...


Yes, it doesn't support subqueries in the check expression direcly,
however it does support function calls, which is where the stored
procedures come in. So it's possible to do it, but whether it's either
efficient or desirable is another matter :-).

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to