On 09/17/2014 03:36 PM, Peter Eisentraut wrote:
On 9/17/14 3:04 PM, Pavel Stehule wrote:
What is difference between content of variable or content of database?
You can test any prerequisite, but when this prerequisite is not solved,
than exception is very very hard without possible handling.

If the assertion tests arbitrary Boolean expressions, then we can't stop
the user from abusing them.

Exactly. Doing something like

    ASSERT (select count(*) from foo
        where fk not in (select pk from bar)) = 0;

is a perfectly fine, arbitrary boolean expression. It will probably work well in a development environment too. And I am very sure that it will not scale well once that code gets deployed. And I know how DBAs react to the guaranteed following performance problem. They will disable ALL assert ... or was there some sort of assert class system proposed that I missed?


But it's another thing if we design specific syntax that encourages such
abuse, as proposed earlier.

The design should explicitly discourage that sort of nonsense.


Jan


--
Jan Wieck
Senior Software Engineer
http://slony.info


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to