ALTER TYPE 0: Introduction; test cases

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ALTER TYPE 0: Introduction; test cases
Date: 2011-01-09 21:59:52
Message-ID: 20110109215952.GA5777@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
at0-debug-tests.patch text/plain 124.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-01-09 22:00:23 ALTER TYPE 1: recheck index-based constraints
Previous Message Tom Lane 2011-01-09 21:10:25 hstore ?& operator versus mathematics