postgresql/src/test
Tom Lane 6b2c4e59d0 Improve error cursor positions for problems with partition bounds.
We failed to pass down the query string to check_new_partition_bound,
so that its attempts to provide error cursor positions were for naught;
one must have the query string to get parser_errposition to do anything.
Adjust its API to require a ParseState to be passed down.

Also, improve the logic inside check_new_partition_bound so that the
cursor points at the partition bound for the specific column causing
the issue, when one can be identified.

That part is also for naught if we can't determine the query position of
the column with the problem.  Improve transformPartitionBoundValue so
that it makes sure that const-simplified partition expressions will be
properly labeled with positions.  In passing, skip calling evaluate_expr
if the value is already a Const, which is surely the most common case.

Alexandra Wang, Ashwin Agrawal, Amit Langote; reviewed by Ashutosh Bapat

Discussion: https://postgr.es/m/CACiyaSopZoqssfMzgHk6fAkp01cL6vnqBdmTw2C5_KJaFR_aMg@mail.gmail.com
Discussion: https://postgr.es/m/CAJV4CdrZ5mKuaEsRSbLf2URQ3h6iMtKD=hik8MaF5WwdmC9uZw@mail.gmail.com
2020-09-23 18:04:53 -04:00
..
authentication Make new authentication test case more robust. 2020-09-04 21:01:58 -04:00
examples Update copyrights for 2020 2020-01-01 12:21:45 -05:00
isolation Check default partitions constraints while descending 2020-09-08 19:35:15 -03:00
kerberos Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
ldap Fix rare failure in LDAP tests. 2020-08-03 12:49:36 +12:00
locale Use perl warnings pragma consistently 2020-04-13 11:55:45 -04:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Try to stabilize output from rolenames regression test. 2020-09-17 21:02:55 -04:00
perl Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
recovery Fix interpolation in test name. 2020-09-13 23:29:51 -07:00
regress Improve error cursor positions for problems with partition bounds. 2020-09-23 18:04:53 -04:00
ssl Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
subscription Add additional tests to test streaming of in-progress transactions. 2020-09-07 08:08:58 +05:30
thread Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
README Add TAP tests for password-based authentication methods. 2017-03-17 11:34:16 +02:00

README

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.

authentication/
  Tests for authentication

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

subscription/
  Tests for logical replication

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