postgresql/src/backend/commands
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
..
Makefile Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
aggregatecmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
alter.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
analyze.c Per-column collation support 2011-02-08 23:04:18 +02:00
async.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
cluster.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
comment.c Fix pg_upgrade to handle extensions. 2011-02-09 19:18:08 -05:00
constraint.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
conversioncmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
copy.c Fix error messages for FreeFile in COPY command. 2011-02-07 10:46:56 +09:00
dbcommands.c Per-column collation support 2011-02-08 23:04:18 +02:00
define.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
discard.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
explain.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
extension.c Clean up installation directory choices for extensions. 2011-02-11 22:53:43 -05:00
foreigncmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
functioncmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
indexcmds.c Per-column collation support 2011-02-08 23:04:18 +02:00
lockcmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
opclasscmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
operatorcmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
portalcmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
prepare.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
proclang.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
schemacmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
seclabel.c Per-column collation support 2011-02-08 23:04:18 +02:00
sequence.c Per-column collation support 2011-02-08 23:04:18 +02:00
tablecmds.c Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites. 2011-02-12 08:27:55 -05:00
tablespace.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
trigger.c Extend ALTER TABLE to allow Foreign Keys to be added without initial validation. 2011-02-08 12:23:20 +00:00
tsearchcmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
typecmds.c Tweak find_composite_type_dependencies API a bit more. 2011-02-11 08:47:38 -05:00
user.c Fix pg_upgrade of large object permissions by preserving pg_auth.oid, 2011-01-07 21:59:29 -05:00
vacuum.c Avoid having autovacuum workers wait for relation locks. 2011-02-07 22:04:29 -05:00
vacuumlazy.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
variable.c Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
view.c Per-column collation support 2011-02-08 23:04:18 +02:00