attoptions - Mailing list pgsql-hackers

From Robert Haas
Subject attoptions
Date
Msg-id 603c8f071001101127w3253899vb3f3e15073638774@mail.gmail.com
Whole thread Raw
Responses Re: attoptions  (Alex Hunsaker <badalex@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Feature patch 1 for plperl [PATCH]
Next
From: Tom Lane
Date:
Subject: Re: Feature patch 1 for plperl [PATCH]