postgresql/src/test
Tom Lane f0d65c0eaf Reject system columns as elements of foreign keys.
Up through v11 it was sensible to use the "oid" system column as
a foreign key column, but since that was removed there's no visible
usefulness in making any of the remaining system columns a foreign
key.  Moreover, since the TupleTableSlot rewrites in v12, such cases
actively fail because of implicit assumptions that only user columns
appear in foreign keys.  The lack of complaints about that seems
like good evidence that no one is trying to do it.  Hence, rather
than trying to repair those assumptions (of which there are at least
two, maybe more), let's just forbid the case up front.

Per this patch, a system column in either the referenced or
referencing side of a foreign key will draw this error; however,
putting one in the referenced side would have failed later anyway,
since we don't allow unique indexes to be made on system columns.

Per bug #17877 from Alexander Lakhin.  Back-patch to v12; the
case still appears to work in v11, so we shouldn't break it there.

Discussion: https://postgr.es/m/17877-4bcc658e33df6de1@postgresql.org
2023-03-31 11:18:49 -04:00
..
authentication Make SCRAM iteration count configurable 2023-03-27 09:46:29 +02:00
examples Update copyright for 2023 2023-01-02 15:00:37 -05:00
icu initdb: derive encoding from locale for ICU; similar to libc. 2023-03-10 10:51:24 -08:00
isolation Fix concurrent update issues with MERGE. 2023-03-13 10:22:22 +00:00
kerberos libpq: Add support for require_auth to control authorized auth methods 2023-03-14 14:00:05 +09:00
ldap tests: Prevent syslog activity by slapd, take 2 2023-03-16 23:07:29 -07:00
locale Update copyright for 2023 2023-01-02 15:00:37 -05:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Fix a couple of typos 2023-03-22 08:44:59 +09:00
perl Support connection load balancing in libpq 2023-03-29 21:53:38 +02:00
recovery Force testing of query jumbling in 027_stream_regress.pl 2023-03-03 10:41:51 +09:00
regress Reject system columns as elements of foreign keys. 2023-03-31 11:18:49 -04:00
ssl libpq: Add sslcertmode option to control client certificates 2023-03-24 13:34:26 +09:00
subscription Add new predefined role pg_create_subscription. 2023-03-30 11:37:19 -04:00
Makefile Refactor PG_TEST_EXTRA logic in autoconf build 2022-09-20 11:24:16 -07:00
README Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -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 (but see also below)

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

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

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