Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Date
Msg-id 9906.1238901244@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Apr 4, 2009 at 7:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm not thrilled about adding a column to pg_attribute for this.

> What is the specific nature of your concern?

Actually, I'm more worried about the TupleDesc data structure than
the catalogs.  There are TupleDescs all over the backend, and I've
seen evidence in profiles that setting them up is a nontrivial cost.

You're very possibly right that four more bytes is in the noise,
though.

Two other comments now that I've read a little further:

* This isn't happening for 8.4, so adjust the pg_dump code.

* Using an integer is bogus.  Use a float4 and forget the weird scaling;
it should have exactly the same interpretation as stadistinct, except
for 0 meaning "unset" instead of "unknown".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Next
From: Andrew Gierth
Date:
Subject: Re: contrib/intarray vs empty arrays