postgresql/src/test
Tom Lane c30f1770a9 Apply ALTER ... SET NOT NULL recursively in ALTER ... ADD PRIMARY KEY.
If you do ALTER COLUMN SET NOT NULL against an inheritance parent table,
it will recurse to mark all the child columns as NOT NULL as well.  This
is necessary for consistency: if the column is labeled NOT NULL then
reading it should never produce nulls.

However, that didn't happen in the case where ALTER ... ADD PRIMARY KEY
marks a target column NOT NULL that wasn't before.  That was questionable
from the beginning, and now Tushar Ahuja points out that it can lead to
dump/restore failures in some cases.  So let's make that case recurse too.

Although this is meant to fix a bug, it's enough of a behavioral change
that I'm pretty hesitant to back-patch, especially in view of the lack
of similar field complaints.  It doesn't seem to be too late to put it
into v10 though.

Michael Paquier, editorialized on slightly by me

Discussion: https://postgr.es/m/b8794d6a-38f0-9d7c-ad4b-e85adf860fc9@enterprisedb.com
2017-08-04 11:45:18 -04:00
..
authentication Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
examples Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
isolation Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
locale Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules commit_ts test: Set node name in test 2017-07-12 14:39:44 -04:00
perl Work around Msys weakness in Testlib.pm's command_like() 2017-07-26 22:46:55 -04:00
recovery Fix another race-condition-ish issue in recovery/t/001_stream_rep.pl. 2017-07-05 23:59:20 -04:00
regress Apply ALTER ... SET NOT NULL recursively in ALTER ... ADD PRIMARY KEY. 2017-08-04 11:45:18 -04:00
ssl Remove incorrect comment 2017-06-17 10:19:48 +02:00
subscription Fix replication with replica identity full 2017-06-23 15:40:17 -04:00
thread Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
Makefile Add TAP tests for password-based authentication methods. 2017-03-17 11:34:16 +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