postgresql/src/test
Andrew Gierth 624046abe2 Postpone aggregate checks until after collation is assigned.
Previously, parseCheckAggregates was run before
assign_query_collations, but this causes problems if any expression
has already had a collation assigned by some transform function (e.g.
transformCaseExpr) before parseCheckAggregates runs. The differing
collations would cause expressions not to be recognized as equal to
the ones in the GROUP BY clause, leading to spurious errors about
unaggregated column references.

The result was that CASE expr WHEN val ... would fail when "expr"
contained a GROUPING() expression or matched one of the group by
expressions, and where collatable types were involved; whereas the
supposedly identical CASE WHEN expr = val ... would succeed.

Backpatch all the way; this appears to have been wrong ever since
collations were introduced.

Per report from Guillaume Lelarge, analysis and patch by me.

Discussion: https://postgr.es/m/CAECtzeVSO_US8C2Khgfv54ZMUOBR4sWq+6_bLrETnWExHT=rFg@mail.gmail.com
Discussion: https://postgr.es/m/87muo0k0c7.fsf@news-spur.riddles.org.uk
2019-01-17 06:26:15 +00:00
..
examples Client-side fixes for delayed NOTIFY receipt. 2018-10-19 22:22:57 -04:00
isolation Ignore inherited temp relations from other sessions when truncating 2018-12-27 10:17:21 +09:00
locale Add a temp-install prerequisite to "check"-like targets not having one. 2017-11-05 18:52:38 -08:00
mb Revert "Fix broken multibyte regression tests." 2016-01-26 08:29:15 +09:00
modules Fix test_rls_hooks to assign expression collations properly. 2018-12-11 11:48:00 -05:00
perl Fix mis-backpatch of c015ccb306. 2018-10-16 13:24:42 -04:00
recovery In tests, await an LSN no later than the recovery target. 2017-12-31 22:01:27 -08:00
regress Postpone aggregate checks until after collation is assigned. 2019-01-17 06:26:15 +00:00
ssl Update ssl test certificates and keys 2019-01-03 15:08:21 +01:00
thread Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
README Minor tweaks for new src/test/recovery 2016-02-29 18:16:59 -03:00

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

thread/
  A thread-safety-testing utility used by configure