pgsql: Replace ALTER TABLE ...

Started by Nonamealmost 16 years ago5 messages
#1Noname
rhaas@postgresql.org

Log Message:
-----------
Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general mechanism.

Attributes can now have options, just as relations and tablespaces do, and
the reloptions code is used to parse, validate, and store them. For
simplicity and because these options are not performance critical, we store
them in a separate cache rather than the main relcache.

Thanks to Alex Hunsaker for the review.

Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.218 -> r2.219)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml?r1=2.218&r2=2.219)
pgsql/doc/src/sgml/ref:
alter_table.sgml (r1.109 -> r1.110)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_table.sgml?r1=1.109&r2=1.110)
analyze.sgml (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/analyze.sgml?r1=1.27&r2=1.28)
pgsql/src/backend/access/common:
reloptions.c (r1.31 -> r1.32)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/reloptions.c?r1=1.31&r2=1.32)
tupdesc.c (r1.131 -> r1.132)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/tupdesc.c?r1=1.131&r2=1.132)
pgsql/src/backend/bootstrap:
bootstrap.c (r1.257 -> r1.258)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootstrap.c?r1=1.257&r2=1.258)
pgsql/src/backend/catalog:
genbki.pl (r1.6 -> r1.7)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/genbki.pl?r1=1.6&r2=1.7)
heap.c (r1.366 -> r1.367)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c?r1=1.366&r2=1.367)
index.c (r1.330 -> r1.331)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c?r1=1.330&r2=1.331)
pgsql/src/backend/commands:
analyze.c (r1.147 -> r1.148)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c?r1=1.147&r2=1.148)
tablecmds.c (r1.317 -> r1.318)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.317&r2=1.318)
pgsql/src/backend/parser:
gram.y (r2.703 -> r2.704)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.703&r2=2.704)
pgsql/src/backend/utils/cache:
Makefile (r1.24 -> r1.25)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/Makefile?r1=1.24&r2=1.25)
pgsql/src/bin/pg_dump:
pg_dump.c (r1.567 -> r1.568)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.567&r2=1.568)
pg_dump.h (r1.160 -> r1.161)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.h?r1=1.160&r2=1.161)
pgsql/src/bin/psql:
tab-complete.c (r1.190 -> r1.191)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/tab-complete.c?r1=1.190&r2=1.191)
pgsql/src/include/access:
reloptions.h (r1.18 -> r1.19)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/reloptions.h?r1=1.18&r2=1.19)
pgsql/src/include/catalog:
pg_attribute.h (r1.157 -> r1.158)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_attribute.h?r1=1.157&r2=1.158)
pgsql/src/include/nodes:
parsenodes.h (r1.425 -> r1.426)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.425&r2=1.426)

#2Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Noname (#1)
Re: [COMMITTERS] pgsql: Replace ALTER TABLE ...

On Fri, 2010-01-22 at 16:40 +0000, Robert Haas wrote:

Log Message:
-----------
Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general
mechanism.

I think this broke doc builds:

openjade -wall -wno-unused-param -wno-empty -wfully-tagged -D . -D . -c /usr/share/sgml/docbook/dsssl-stylesheets/catalog -d stylesheet.dsl -t sgml -i output-html -V html-index postgres.sgml
openjade:ref/alter_table.sgml:162:156:E: end tag for "LITERAL" omitted, but OMITTAG NO was specified
openjade:ref/alter_table.sgml:162:10: start tag was here
openjade:ref/alter_table.sgml:162:166:E: end tag for element "LITERAL" which is not open
openjade:ref/alter_table.sgml:164:13:E: document type does not allow element "LISTITEM" here
openjade:ref/alter_table.sgml:191:17:E: end tag for "TERM" omitted, but OMITTAG NO was specified
openjade:ref/alter_table.sgml:163:4: start tag was here
openjade:ref/alter_table.sgml:191:17:E: end tag for "VARLISTENTRY" which is not finished
gmake: *** [HTML.index] Error 1
gmake: *** Deleting file `HTML.index'

--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz

#3Robert Haas
robertmhaas@gmail.com
In reply to: Devrim GÜNDÜZ (#2)
Re: [COMMITTERS] pgsql: Replace ALTER TABLE ...

2010/1/22 Devrim GÜNDÜZ <devrim@gunduz.org>:

On Fri, 2010-01-22 at 16:40 +0000, Robert Haas wrote:

Log Message:
-----------
Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general
mechanism.

I think this broke doc builds:

Dang, how'd that happen? I could have sworn I tested this.

Will fix, sorry.

...Robert

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#3)
Re: [COMMITTERS] pgsql: Replace ALTER TABLE ...

Robert Haas <robertmhaas@gmail.com> writes:

2010/1/22 Devrim G�ND�Z <devrim@gunduz.org>:

I think this broke doc builds:

Dang, how'd that happen? I could have sworn I tested this.

Some versions of docbook are pickier than others --- maybe yours
didn't complain?

regards, tom lane

#5Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#4)
Re: [COMMITTERS] pgsql: Replace ALTER TABLE ...

2010/1/22 Tom Lane <tgl@sss.pgh.pa.us>:

Robert Haas <robertmhaas@gmail.com> writes:

2010/1/22 Devrim GÜNDÜZ <devrim@gunduz.org>:

I think this broke doc builds:

Dang, how'd that happen?  I could have sworn I tested this.

Some versions of docbook are pickier than others --- maybe yours
didn't complain?

It's complaining now, so I don't think that's it. I think maybe I
just got confused because I rebuilt the docs for my libpq patch about
10 times yesterday, and I ASSUMED that because I hadn't changed the
docs for this patch in a long time I didn't need to retest. But maybe
I never did test them after all. I spent the whole morning making
sure it didn't break with -DCLOBBER_CACHE_ALWAYS=1. One of these days
I'll manage to do one of these that doesn't require 2 or 3 follow-on
commits...

...Robert