postgresql/src/test
Alvaro Herrera 1f8a3327a9 Avoid having two PKs in a partition
If a table containing a primary key is attach as partition to a
partitioned table which has a primary key with a different definition,
we would happily create a second one in the new partition.  Oops.  It
turns out that this is because an error check in DefineIndex is executed
only if you tell it that it's being run by ALTER TABLE, and the original
code here wasn't.  Change it so that it does.

Added a couple of test cases for this, also.  A previously working test
started to fail in a different way than before patch because the new
check is called earlier; change the PK to plain UNIQUE so that the new
behavior isn't invoked, so that the test continues to verify what we
want it to verify.

Reported by: Noriyoshi Shinoda
Discussion: https://postgr.es/m/DF4PR8401MB102060EC2615EC9227CC73F7EEDF0@DF4PR8401MB1020.NAMPRD84.PROD.OUTLOOK.COM
2018-03-12 19:42:32 -03:00
..
authentication Add installcheck support to more test suites 2018-01-23 07:11:38 -05:00
examples Document security implications of search_path and the public schema. 2018-02-26 07:39:44 -08:00
isolation Remove restriction on SQL block length in isolationtester scanner. 2018-02-28 16:57:37 -05:00
kerberos Tests for Kerberos/GSSAPI authentication 2018-03-06 10:57:36 -05:00
ldap Prevent LDAP and SSL tests from running without support in build 2018-03-03 08:52:21 -05:00
locale Add a temp-install prerequisite to "check"-like targets not having one. 2017-11-05 18:51:08 -08:00
mb
modules Fix improper uses of canonicalize_qual(). 2018-03-11 18:10:42 -04:00
perl Raise Test::More version requirement 2018-03-06 14:42:10 -05:00
recovery Add installcheck support to more test suites 2018-01-23 07:11:38 -05:00
regress Avoid having two PKs in a partition 2018-03-12 19:42:32 -03:00
ssl Fix test counting in SSL tests 2018-03-07 00:53:25 -05:00
subscription Fix filtering of unsupported relations in logical replication 2018-02-23 22:13:21 -05:00
thread Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Tests for Kerberos/GSSAPI authentication 2018-03-06 10:57:36 -05: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