I meant to say constraint exclusion. Exclusion constraints would be pretty hard to implement in a distributed system.
That said - constraint exclusion wouldn't be all that rough, would it? The eventual goal I am thinking of is more effective query plans for UNION views over a bunch of federated partitions.
"Exclusion constraints would be pretty hard to implement in a distributed system."
It would be cool, though ;-)
"constraint exclusion wouldn't be all that rough, would it"
There are two interpretations of that:
* Passing a predicate down to the remote side so that the remote server can use it to exclude partitions. I believe this already works.
* Using CHECK constraints on the local side so that foreign tables can be excluded on the local side. This is a little trickier because it's hard to know that there are really no tuples on the remote side that violate the constraint. It's debatable how important that is, but it does need to be handled sanely somehow if the situation arises.
Comments
Do you have an idea how that might be done?
Wow, sorry. I misspoke.
I meant to say constraint exclusion. Exclusion constraints would be pretty hard to implement in a distributed system.
That said - constraint exclusion wouldn't be all that rough, would it? The eventual goal I am thinking of is more effective query plans for UNION views over a bunch of federated partitions.
"Exclusion constraints would be pretty hard to implement in a distributed system."
It would be cool, though ;-)
"constraint exclusion wouldn't be all that rough, would it"
There are two interpretations of that:
* Passing a predicate down to the remote side so that the remote server can use it to exclude partitions. I believe this already works.
* Using CHECK constraints on the local side so that foreign tables can be excluded on the local side. This is a little trickier because it's hard to know that there are really no tuples on the remote side that violate the constraint. It's debatable how important that is, but it does need to be handled sanely somehow if the situation arises.
I intended the second one. I assumed it would be necessary for writable federated views.