Martijn van Oosterhout wrote:
Sure, that's what you could do, but it makes the query rather more
complex than it needs to be.
Do you consider this overly complex? Compare:
DELETE FROM x WHERE EXISTS (SELECT * FROM table WHERE x.a = table.a and x.b > table.b and table.c = 4)
to:
DELETE FROM x, table WHERE x.a = table.a and x.b > table.b and table.c = 4
In the latter, what is it you are deleting? Is it x or table? I'm not at all in favor of listing several tables in the FROM clause of a DELETE statement (that includes implicitly adding them).
I assume you mean transform_null_equals. If so, you just made my point. It's disabled by default. Probably for the reason you mention.transform_equals_null comes to mind. It's a hack to make 'x = NULL' work the way people coming from Oracle expect. It "fixes" it to be 'x IS NULL'.
That is arguably something that could cause unexpected results.
It has to be exactly one tuple. If there are zero tuples you get zeroSo how is this relevant to the argument? This is not about the capabilities of an imaginary test framework. It was just an example!
output. Cross-joining with an empty table produces no output. You're
shipping a product where people expect to be able to add more rows to a
table, but you never test that?
It's not totally uncommon for a test framework to trigger on warnings and errors (for obvious reasons). My imaginary test actually did just that (as stated).As I said before, I don't object to the presence of this "option" so that people that really knows _why_ they enable it can do so, but I strongly object to having this option enabled by default. I suggest that:
1. Have this option disabled by default.
2. Print WARNING's rather than notifications when tables are added.
If you're not seeing NOTICEs now, what makes you think you'll see WARNINGs?
Every DB interface I've used so far displays the noticesRight. Useful "warnings"! Seems you agree that this should be a warning, not a notice.
where I can see them. This notice is one of the less useful, there
are other more useful warnings which are much more handy to see...
Regards, Thomas Hallgren
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org