postgresql/src/test
Peter Eisentraut 2ea5b06c7a Add CREATE SEQUENCE AS <data type> clause
This stores a data type, required to be an integer type, with the
sequence.  The sequences min and max values default to the range
supported by the type, and they cannot be set to values exceeding that
range.  The internal implementation of the sequence is not affected.

Change the serial types to create sequences of the appropriate type.
This makes sure that the min and max values of the sequence for a serial
column match the range of values supported by the table column.  So the
sequence can no longer overflow the table column.

This also makes monitoring for sequence exhaustion/wraparound easier,
which currently requires various contortions to cross-reference the
sequences with the table columns they are used with.

This commit also effectively reverts the pg_sequence column reordering
in f3b421da5f, because the new seqtypid
column allows us to fill the hole in the struct and create a more
natural overall column ordering.

Reviewed-by: Steve Singer <steve@ssinger.info>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2017-02-10 15:34:35 -05:00
..
examples Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
isolation Fix typos in comments. 2017-02-06 11:33:58 +02:00
locale Use 'use strict' in all Perl programs 2017-01-05 12:34:48 -05:00
mb Revert "Fix broken multibyte regression tests." 2016-01-26 08:29:15 +09:00
modules Add CREATE SEQUENCE AS <data type> clause 2017-02-10 15:34:35 -05:00
perl Remove all references to "xlog" from SQL-callable functions in pg_proc. 2017-02-09 15:10:09 -05:00
recovery Remove all references to "xlog" from SQL-callable functions in pg_proc. 2017-02-09 15:10:09 -05:00
regress Add CREATE SEQUENCE AS <data type> clause 2017-02-10 15:34:35 -05:00
ssl Fix typos in comments. 2017-02-06 11:33:58 +02:00
subscription Remove all references to "xlog" from SQL-callable functions in pg_proc. 2017-02-09 15:10:09 -05:00
thread Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Logical replication 2017-01-20 09:04:49 -05:00
README Mention logical replication tests in src/test/README. 2017-01-24 12:57:25 +09: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

subscription/
  Tests for logical replication

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