postgresql/src/backend
Robert Haas d31e2a495b Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites.
When the old type is binary coercible to the new type and the using
clause does not change the column contents, we can avoid a full table
rewrite, though any indexes on the affected columns will still need
to be rebuilt.  This applies, for example, when changing a varchar
column to be of type text.

The prior coding assumed that the set of operations that force a
rewrite is identical to the set of operations that must be propagated
to tables making use of the affected table's rowtype.  This is
no longer true: even though the tuples in those tables wouldn't
need to be modified, the data type change invalidate indexes built
using those composite type columns.  Indexes on the table we're
actually modifying can be invalidated too, of course, but the
existing machinery is sufficient to handle that case.

Along the way, add some debugging messages that make it possible
to understand what operations ALTER TABLE is actually performing
in these cases.

Noah Misch and Robert Haas
2011-02-12 08:27:55 -05:00
..
access Send status updates back from standby server to master, indicating how far 2011-02-10 21:04:02 +02:00
bootstrap Per-column collation support 2011-02-08 23:04:18 +02:00
catalog Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites. 2011-02-12 08:27:55 -05:00
commands Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites. 2011-02-12 08:27:55 -05:00
executor Fix improper matching of resjunk column names for FOR UPDATE in subselect. 2011-02-09 23:27:42 -05:00
foreign Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
lib Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
main Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
nodes Add support for multiple versions of an extension and ALTER EXTENSION UPDATE. 2011-02-11 21:25:57 -05:00
optimizer Fix improper matching of resjunk column names for FOR UPDATE in subselect. 2011-02-09 23:27:42 -05:00
parser Add support for multiple versions of an extension and ALTER EXTENSION UPDATE. 2011-02-11 21:25:57 -05:00
po Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
port Move pipe.c into the backend. 2011-02-04 15:52:21 -05:00
postmaster Track last time for statistics reset on databases and bgwriter 2011-02-10 15:14:04 +01:00
regex Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
replication Typo fixes. receivedUpto should be capitalized consistently. 2011-02-11 11:55:12 -05:00
rewrite Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
snowball Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
storage Allocate all entries in the serializable xid hash up-front, so that you don't 2011-02-10 12:03:21 +02:00
tcop Add support for multiple versions of an extension and ALTER EXTENSION UPDATE. 2011-02-11 21:25:57 -05:00
tsearch Fix "variable not used" warnings when USE_WIDE_UPPER_LOWER is not 2011-02-10 16:58:02 -05:00
utils Send status updates back from standby server to master, indicating how far 2011-02-10 21:04:02 +02:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
common.mk Workaround for recursive make breakage 2011-01-13 09:32:06 +02:00
nls.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00