ALTER TYPE 0: Introduction; test cases - Mailing list pgsql-hackers

From Noah Misch
Subject ALTER TYPE 0: Introduction; test cases
Date
Msg-id 20110109215952.GA5777@tornado.leadboat.com
Whole thread Raw
Responses Re: ALTER TYPE 0: Introduction; test cases  (Simon Riggs <simon@2ndQuadrant.com>)
Re: ALTER TYPE 0: Introduction; test cases  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
This begins the patch series for the design I recently proposed[1] for avoiding
some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE.  I'm posting these
patches today:

0 - new test cases
1 - recheck UNIQUE constraints on ALTER TYPE
2 - skip cases where we can already prove there's no work
3 - add ability to identify more cases; demo with varchar and xml
4 - support temporal types
5 - support varbit
6 - support numeric

Patches 0-2 are each freestanding.  Patch 3 depends on patch 2.  Patches 4-6 all
depend on 3, but not on each other.  I haven't tested permutations of patch
application other than a linear progression, so YMMV -- those are the conceptual
dependencies, though perhaps not the lexical ones.


This first patch adds various test cases that will exercise the conditions
pertinent to this patch series.  Later patches generally do not change the test
cases, but they do update the expected output, and this illustrates the
improvements each patch brings.  To make that possible, this patch also adds
DEBUG-level messages for when we build/rebuild an index, rewrite a table, scan a
table for CHECK constraint verification, or validate a foreign key constraint.

[1] http://archives.postgresql.org/pgsql-hackers/2010-12/msg02360.php

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: hstore ?& operator versus mathematics
Next
From: Noah Misch
Date:
Subject: ALTER TYPE 1: recheck index-based constraints