attoptions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: attoptions
Date: 2010-01-10 19:27:44
Message-ID: 603c8f071001101127w3253899vb3f3e15073638774@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

PFA a revised attoptions patch. This may still be a little rough
around the edges, but I wanted to get it out there for feedback. This
would replace ALTER TABLE ... SET STATISTICS DISTINCT.

I am not very happy with ATPrepSetOptions(). I basically just
retained the logic from ATPrepSetDistinct(), but it doesn't really
make sense in this context. The idea that we want to support
attdistinct for system tables and index columns was based on a very
specific understanding of what that was going to do; for attoptions,
well, it might make sense for the options that we have now, but it
might not make sense for the next thing we want to add, and there's
not going to be any easy fix for that. Even as it stands, the
n_distinct_inherited option is supported for both table columns and
index columns, but it only actually does anything for table columns.

One possibility is to just give up on supporting attoptions for system
table columns and index columns and support them only for regular
table columns. That will lose the ability to override n_distinct for
expression indexes and system tables, but how much do we really care?

Another option is to just jettison this whole concept as a bad idea
and leave it the way it is.

There might be other reasonable options, too. Thoughts?

...Robert

Attachment Content-Type Size
attoptions-v2.patch text/x-patch 43.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-10 19:49:20 Re: Feature patch 1 for plperl [PATCH]
Previous Message Robert Haas 2010-01-10 19:17:13 Re: Feature patch 1 for plperl [PATCH]