mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
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.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/reloptions.h,v 1.18 2010/01/05 21:53:59 rhaas Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/reloptions.h,v 1.19 2010/01/22 16:40:19 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -40,7 +40,8 @@ typedef enum relopt_kind
|
||||
RELOPT_KIND_HASH = (1 << 3),
|
||||
RELOPT_KIND_GIN = (1 << 4),
|
||||
RELOPT_KIND_GIST = (1 << 5),
|
||||
RELOPT_KIND_TABLESPACE = (1 << 6),
|
||||
RELOPT_KIND_ATTRIBUTE = (1 << 6),
|
||||
RELOPT_KIND_TABLESPACE = (1 << 7),
|
||||
/* if you add a new kind, make sure you update "last_default" too */
|
||||
RELOPT_KIND_LAST_DEFAULT = RELOPT_KIND_TABLESPACE,
|
||||
/* some compilers treat enums as signed ints, so we can't use 1 << 31 */
|
||||
@@ -266,6 +267,7 @@ extern bytea *default_reloptions(Datum reloptions, bool validate,
|
||||
extern bytea *heap_reloptions(char relkind, Datum reloptions, bool validate);
|
||||
extern bytea *index_reloptions(RegProcedure amoptions, Datum reloptions,
|
||||
bool validate);
|
||||
extern bytea *attribute_reloptions(Datum reloptions, bool validate);
|
||||
extern bytea *tablespace_reloptions(Datum reloptions, bool validate);
|
||||
|
||||
#endif /* RELOPTIONS_H */
|
||||
|
||||
Reference in New Issue
Block a user