postgresql/src
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
..
backend Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites. 2011-02-12 08:27:55 -05:00
bin Add support for multiple versions of an extension and ALTER EXTENSION UPDATE. 2011-02-11 21:25:57 -05:00
include Add support for multiple versions of an extension and ALTER EXTENSION UPDATE. 2011-02-11 21:25:57 -05:00
interfaces Use GSSAPI library for SSPI auth, when native SSPI is not available 2011-01-29 17:06:55 +01:00
makefiles Clean up installation directory choices for extensions. 2011-02-11 22:53:43 -05:00
pl Per-column collation support 2011-02-08 23:04:18 +02:00
port Fix pg_get_encoding_from_locale() function call parameters to match 2011-02-10 15:39:41 -05:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Fix isolation tester Makefile so that it runs in a VPATH build 2011-02-10 19:50:43 -03:00
timezone Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tools Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
Makefile.global.in sepgsql, an SE-Linux integration for PostgreSQL 2011-01-23 20:48:27 -05:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00