summaryrefslogtreecommitdiff
path: root/src/include/access/reloptions.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-01-22 16:40:19 +0000
committerRobert Haas <rhaas@postgresql.org>2010-01-22 16:40:19 +0000
commit76a47c0e7423891d4b4f0977312f46fec6c5c416 (patch)
tree8c9ad15f5c0bf5b2c129ec78fece1780eb430c0d /src/include/access/reloptions.h
parent9ca0989037602d9835eec04c2a9b6016a7b55740 (diff)
downloadpostgresql-76a47c0e7423891d4b4f0977312f46fec6c5c416.tar.gz
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.
Diffstat (limited to 'src/include/access/reloptions.h')
-rw-r--r--src/include/access/reloptions.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h
index f7f5587f7c..2756eabff0 100644
--- a/src/include/access/reloptions.h
+++ b/src/include/access/reloptions.h
@@ -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 */