In updating for 8.0, I got rid of all the `E''`s in `sql/resultset.sql` and `sql/valueset.sql`, but since they had backslashes in them, they broke in later versions. Fortunately, I was able to replaces those backslashes (in regular expressions) with character classes (`[(]` instead of `\\(`), thus eliminating the problem in all versions of PostgreSQL. Also updated the 8.3 install patch, since I deleted a line while working on 8.0. Also got the 8.3 patch to apply again!
It turns out that PostgreSQL 8.1 and earlier don't support the `VALUES` statement. So I moved all the tests in `sql/resultset.sql` to `sql/valueset.sql` and disabled them for 8.1 and earlier. Then I changed all the uses of `VALUES` in `sql/resultset.sql` to use either `UNION` queries (for set- and bag-comparing functions, where order doesn't matter) or temporary tables (for result-comparing functions, where order does matter).
Added `results_ne()` and fixed a bug in `results_ne()` where `NULL` columns were not properly respected. See [the blog entry](http://justatheory.com/computers/databases/postgresql/neither-null-nor-not-null.html) for more on this particular SQL pathology.
Add the `set_has()`, `bag_has()`, `set_hasnt()`, and `bag_hasnt()` functions to test subsets of query results. Also eliminated some trailing whitespace and updated `uninstal_pgtap.sql.in`.
…tion. * Added support for prepared statement names in `throws_ok()`, `lives_ok()`, and `performs_ok()`. * Moved documentation for sql query arguments, including support for prepared statement names, to a new top-level header, "Submit Your Query" (better name requested!), which encapsulates the above three functions as well as the resultset-comparing functions. * Renamed the "query" argument to `throws_ok()`, `lives_ok()`, and `performs_ok()` functions to "sql". * Completed the documentation for the result set testing functions. * Eliminated bogus extra newline in the diagnostics from `set_eq()` and `bag_eq()`.
* Added `results_eq()`, `set_eq()`, and `bag_eq()` to `Changes`. * Noted a few other To-Dos for the result comparison functions. * Made varying column count and type diagnostics more succinct. * Switched `restuls_eq()` to `IS DISTINCT FROM` instead of `<>` so that `NULL`s will be compared in a reasonable way. * Added exception handling to deal with data type mismatches when comparing results in `results_eq()`. * Added code to close cursors opened by `results_eq()`. Cursors passed from userland will not be touched. * Added variations of `results_eq()` to mix and match cursor and SQL statement arguments.
* Dropped `poset_eq()`. It was just way too hard to do. And how do you really ignore dupes, since the dupes can effect order? It's just not worth it at this point. * Added tests for `bag_eq()`. * Added tests for `pobag_eq()` and fixed it up to actually work. This included making it display "()" in the diagnostics when a row is empty, as I think that this will be more intuitive than parens with a bunch of commas. * Tweaked the wording of the diagnostic message for `pobag_eq()`. * Added an implementation of `pobag_eq()` that can take cursor arguments directly. * Deleted a bunch of comments that were playing with various function names.
* Added `function_returns()`. * Refactored all of the function-related tests to use a new view, `tap_funky`, to make them all quite a bit simpler. There was too much redundant code! * Added some notes for some other function-testing assertions to add. I've already added the necessary code to `tap_funky` to make them work. * Eliminated some extra spaces in the test descriptions in `sql/functap.sql`.
* Added `hasnt_index()`. * Restored `_have_index()`, turns out I needed it after all. It was broken, though, so I refactored it to do a proper index lookup. I added a bunch of new tests in the process of tracking down the problem. * Fixed a bunch of "not should" typos; they are supposed to be "should not".