postgresql/src/test/subscription
Peter Eisentraut 533c5d8bdd Fix application of identity values in some cases
Investigation of 2d2d06b7e2 revealed that
identity values were not applied in some further cases, including
logical replication subscribers, VALUES RTEs, and ALTER TABLE ... ADD
COLUMN.  To fix all that, apply the identity column expression in
build_column_default() instead of repeating the same logic at each call
site.

For ALTER TABLE ... ADD COLUMN ... IDENTITY, the previous coding
completely ignored that existing rows for the new column should have
values filled in from the identity sequence.  The coding using
build_column_default() fails for this because the sequence ownership
isn't registered until after ALTER TABLE, and we can't do it before
because we don't have the column in the catalog yet.  So we specially
remember in ColumnDef the sequence name that we decided on and build a
custom NextValueExpr using that.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2018-02-02 14:39:10 -05:00
..
t Fix application of identity values in some cases 2018-02-02 14:39:10 -05:00
.gitignore Logical replication 2017-01-20 09:04:49 -05:00
Makefile Add installcheck support to more test suites 2018-01-23 07:11:38 -05:00
README Add installcheck support to more test suites 2018-01-23 07:11:38 -05:00

src/test/subscription/README

Regression tests for subscription/logical replication
=====================================================

This directory contains a test suite for subscription/logical replication.

Running the tests
=================

    make check

or

    make installcheck

NOTE: This creates a temporary installation (in the case of "check"),
and some tests may create one or multiple nodes, for the purpose of
the tests.

NOTE: This requires the --enable-tap-tests argument to configure.