Wow, so I guess I'm pretty much wrong about this... Sorry for the noise guys. I failed to consider different uses for functions, obviously, and it's not possible to automatically detect usages which could cause problems.
Perhaps this is more of a bug in the documentation than anything else. I couldn't find any documentation for the behavior for what will happen if a query is executed inside a function which is called from a check statement. I also couldn't find anything about calling function inside check statements in general, but perhaps that's not necessary. I do, however, think it should definitely be documented somewhere that functions cannot be used to get around the lack of check statement subqueries, because the ordering of operations is wrong.
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2012-04-25 21:28:24|
|Subject: Re: BUG #6605: wrong type cast from timestamp to timestamptz |
|Previous:||From: ghircoiascamil||Date: 2012-04-25 19:34:11|
|Subject: BUG #6613: tablespace data ignored after reinstalling windows |