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

From Robert Haas
Subject Re: ALTER TYPE 0: Introduction; test cases
Date
Msg-id AANLkTi=7+c42to2qSwMRKC5QjcetVuK1k81kxKccAuiL@mail.gmail.com
Whole thread Raw
In response to ALTER TYPE 0: Introduction; test cases  (Noah Misch <noah@leadboat.com>)
Responses Re: ALTER TYPE 0: Introduction; test cases  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Sun, Jan 9, 2011 at 4:59 PM, Noah Misch <noah@leadboat.com> wrote:
> 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

This doesn't look right.  You might be building it, but you sure
aren't rebuilding it.

+CREATE TABLE parent (keycol numeric PRIMARY KEY);
+NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"parent_pkey" for table "parent"
+DEBUG:  Rebuilding index "parent_pkey"

In general, I think this is six kinds of overkill.  I don't think we
really need 2000 lines of new regression tests for this feature.  I'd
like to see that chopped down by at least 10x.

I don't like this bit:

+       ereport(IsToastRelation(indexRelation) ? DEBUG2 : DEBUG1,

I see no reason to set the verbosity differently depending on whether
or not something's a toast relation; that seems more likely to be
confusing than helpful.  I guess my vote would be to make all of these
messages DEBUG2, period.  A quick test suggests that doesn't produce
too much noise executing DDL commands.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: LOCK for non-tables
Next
From: Robert Haas
Date:
Subject: Re: LOCK for non-tables