diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-02 22:14:53 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-02 22:14:53 +0000 |
commit | 90725929465474648de133d216b873bdb69fe357 (patch) | |
tree | 7285d55b3b98e6050d7bd035aacf25a20191d888 /src | |
parent | 527f0ae3fa48c3c3a8ba1bde19039545e88a52b6 (diff) | |
download | postgresql-90725929465474648de133d216b873bdb69fe357.tar.gz postgresql-90725929465474648de133d216b873bdb69fe357.zip |
Add ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT
Robert Haas
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/common/tupdesc.c | 5 | ||||
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 3 | ||||
-rw-r--r-- | src/backend/catalog/heap.c | 18 | ||||
-rw-r--r-- | src/backend/catalog/index.c | 3 | ||||
-rw-r--r-- | src/backend/commands/analyze.c | 10 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 116 | ||||
-rw-r--r-- | src/backend/parser/gram.y | 11 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 53 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.h | 3 | ||||
-rw-r--r-- | src/bin/psql/tab-complete.c | 45 | ||||
-rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_attribute.h | 518 | ||||
-rw-r--r-- | src/include/catalog/pg_class.h | 4 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 7 |
14 files changed, 503 insertions, 297 deletions
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 0bd50318f6c..9c561beed19 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.127 2009/07/16 06:33:42 petere Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.128 2009/08/02 22:14:51 tgl Exp $ * * NOTES * some of the executor utility code such as "ExecTypeFromTL" should be @@ -338,6 +338,8 @@ equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2) return false; if (attr1->attstattarget != attr2->attstattarget) return false; + if (attr1->attdistinct != attr2->attdistinct) + return false; if (attr1->attlen != attr2->attlen) return false; if (attr1->attndims != attr2->attndims) @@ -465,6 +467,7 @@ TupleDescInitEntry(TupleDesc desc, MemSet(NameStr(att->attname), 0, NAMEDATALEN); att->attstattarget = -1; + att->attdistinct = 0; att->attcacheoff = -1; att->atttypmod = typmod; diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index ff31e5f040e..ac560ee298d 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.251 2009/07/31 20:26:22 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.252 2009/08/02 22:14:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -757,6 +757,7 @@ DefineAttr(char *name, char *type, int attnum) } attrtypes[attnum]->attstattarget = -1; + attrtypes[attnum]->attdistinct = 0; attrtypes[attnum]->attcacheoff = -1; attrtypes[attnum]->atttypmod = -1; attrtypes[attnum]->attislocal = true; diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 478583a742f..01084553682 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.356 2009/07/30 02:45:36 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.357 2009/08/02 22:14:52 tgl Exp $ * * * INTERFACE ROUTINES @@ -111,37 +111,37 @@ static List *insert_ordered_unique_oid(List *list, Oid datum); */ static FormData_pg_attribute a1 = { - 0, {"ctid"}, TIDOID, 0, sizeof(ItemPointerData), + 0, {"ctid"}, TIDOID, 0, 0, sizeof(ItemPointerData), SelfItemPointerAttributeNumber, 0, -1, -1, false, 'p', 's', true, false, false, true, 0, {0} }; static FormData_pg_attribute a2 = { - 0, {"oid"}, OIDOID, 0, sizeof(Oid), + 0, {"oid"}, OIDOID, 0, 0, sizeof(Oid), ObjectIdAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; static FormData_pg_attribute a3 = { - 0, {"xmin"}, XIDOID, 0, sizeof(TransactionId), + 0, {"xmin"}, XIDOID, 0, 0, sizeof(TransactionId), MinTransactionIdAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; static FormData_pg_attribute a4 = { - 0, {"cmin"}, CIDOID, 0, sizeof(CommandId), + 0, {"cmin"}, CIDOID, 0, 0, sizeof(CommandId), MinCommandIdAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; static FormData_pg_attribute a5 = { - 0, {"xmax"}, XIDOID, 0, sizeof(TransactionId), + 0, {"xmax"}, XIDOID, 0, 0, sizeof(TransactionId), MaxTransactionIdAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; static FormData_pg_attribute a6 = { - 0, {"cmax"}, CIDOID, 0, sizeof(CommandId), + 0, {"cmax"}, CIDOID, 0, 0, sizeof(CommandId), MaxCommandIdAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; @@ -153,7 +153,7 @@ static FormData_pg_attribute a6 = { * used in SQL. */ static FormData_pg_attribute a7 = { - 0, {"tableoid"}, OIDOID, 0, sizeof(Oid), + 0, {"tableoid"}, OIDOID, 0, 0, sizeof(Oid), TableOidAttributeNumber, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, {0} }; @@ -501,6 +501,7 @@ InsertPgAttributeTuple(Relation pg_attribute_rel, values[Anum_pg_attribute_attname - 1] = NameGetDatum(&new_attribute->attname); values[Anum_pg_attribute_atttypid - 1] = ObjectIdGetDatum(new_attribute->atttypid); values[Anum_pg_attribute_attstattarget - 1] = Int32GetDatum(new_attribute->attstattarget); + values[Anum_pg_attribute_attdistinct - 1] = Float4GetDatum(new_attribute->attdistinct); values[Anum_pg_attribute_attlen - 1] = Int16GetDatum(new_attribute->attlen); values[Anum_pg_attribute_attnum - 1] = Int16GetDatum(new_attribute->attnum); values[Anum_pg_attribute_attndims - 1] = Int32GetDatum(new_attribute->attndims); @@ -571,6 +572,7 @@ AddNewAttributeTuples(Oid new_rel_oid, attr->attrelid = new_rel_oid; /* Make sure these are OK, too */ attr->attstattarget = -1; + attr->attdistinct = 0; attr->attcacheoff = -1; InsertPgAttributeTuple(rel, attr, indstate); diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 73472d1568e..759950b2265 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.320 2009/07/29 20:56:18 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.321 2009/08/02 22:14:52 tgl Exp $ * * * INTERFACE ROUTINES @@ -192,6 +192,7 @@ ConstructTupleDescriptor(Relation heapRelation, to->attnum = i + 1; to->attstattarget = -1; + to->attdistinct = 0; to->attcacheoff = -1; to->attnotnull = false; to->atthasdef = false; diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index f5e76e2aedd..2a90eeaad93 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.139 2009/06/11 14:48:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.140 2009/08/02 22:14:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -425,6 +425,11 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt, std_fetch_func, numrows, totalrows); + + /* If attdistinct is set, override with that value */ + if (stats->attr->attdistinct != 0) + stats->stadistinct = stats->attr->attdistinct; + MemoryContextResetAndDeleteChildren(col_context); } @@ -679,6 +684,9 @@ compute_index_stats(Relation onerel, double totalrows, ind_fetch_func, numindexrows, totalindexrows); + /* If attdistinct is set, override with that value */ + if (stats->attr->attdistinct != 0) + stats->stadistinct = stats->attr->attdistinct; MemoryContextResetAndDeleteChildren(col_context); } } diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 53abfec6976..1f2d67bcb12 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.294 2009/07/30 02:45:36 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.295 2009/08/02 22:14:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -280,9 +280,13 @@ static void ATExecSetNotNull(AlteredTableInfo *tab, Relation rel, static void ATExecColumnDefault(Relation rel, const char *colName, Node *newDefault); static void ATPrepSetStatistics(Relation rel, const char *colName, - Node *flagValue); + Node *newValue); static void ATExecSetStatistics(Relation rel, const char *colName, Node *newValue); +static void ATPrepSetDistinct(Relation rel, const char *colName, + Node *newValue); +static void ATExecSetDistinct(Relation rel, const char *colName, + Node *newValue); static void ATExecSetStorage(Relation rel, const char *colName, Node *newValue); static void ATExecDropColumn(List **wqueue, Relation rel, const char *colName, @@ -2399,13 +2403,19 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, /* No command-specific prep needed */ pass = AT_PASS_ADD_CONSTR; break; - case AT_SetStatistics: /* ALTER COLUMN STATISTICS */ + case AT_SetStatistics: /* ALTER COLUMN SET STATISTICS */ ATSimpleRecursion(wqueue, rel, cmd, recurse); /* Performs own permission checks */ ATPrepSetStatistics(rel, cmd->name, cmd->def); pass = AT_PASS_COL_ATTRS; break; - case AT_SetStorage: /* ALTER COLUMN STORAGE */ + case AT_SetDistinct: /* ALTER COLUMN SET STATISTICS DISTINCT */ + ATSimpleRecursion(wqueue, rel, cmd, recurse); + /* Performs own permission checks */ + ATPrepSetDistinct(rel, cmd->name, cmd->def); + pass = AT_PASS_COL_ATTRS; + break; + case AT_SetStorage: /* ALTER COLUMN SET STORAGE */ ATSimplePermissions(rel, false); ATSimpleRecursion(wqueue, rel, cmd, recurse); /* No command-specific prep needed */ @@ -2616,10 +2626,13 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, case AT_SetNotNull: /* ALTER COLUMN SET NOT NULL */ ATExecSetNotNull(tab, rel, cmd->name); break; - case AT_SetStatistics: /* ALTER COLUMN STATISTICS */ + case AT_SetStatistics: /* ALTER COLUMN SET STATISTICS */ ATExecSetStatistics(rel, cmd->name, cmd->def); break; - case AT_SetStorage: /* ALTER COLUMN STORAGE */ + case AT_SetDistinct: /* ALTER COLUMN SET STATISTICS DISTINCT */ + ATExecSetDistinct(rel, cmd->name, cmd->def); + break; + case AT_SetStorage: /* ALTER COLUMN SET STORAGE */ ATExecSetStorage(rel, cmd->name, cmd->def); break; case AT_DropColumn: /* DROP COLUMN */ @@ -3620,6 +3633,7 @@ ATExecAddColumn(AlteredTableInfo *tab, Relation rel, namestrcpy(&(attribute.attname), colDef->colname); attribute.atttypid = typeOid; attribute.attstattarget = (newattnum > 0) ? -1 : 0; + attribute.attdistinct = 0; attribute.attlen = tform->typlen; attribute.attcacheoff = -1; attribute.atttypmod = typmod; @@ -4007,7 +4021,7 @@ ATExecColumnDefault(Relation rel, const char *colName, * ALTER TABLE ALTER COLUMN SET STATISTICS */ static void -ATPrepSetStatistics(Relation rel, const char *colName, Node *flagValue) +ATPrepSetStatistics(Relation rel, const char *colName, Node *newValue) { /* * We do our own permission checking because (a) we want to allow SET @@ -4088,6 +4102,94 @@ ATExecSetStatistics(Relation rel, const char *colName, Node *newValue) } /* + * ALTER TABLE ALTER COLUMN SET STATISTICS DISTINCT + */ +static void +ATPrepSetDistinct(Relation rel, const char *colName, Node *newValue) +{ + /* + * We do our own permission checking because (a) we want to allow SET + * DISTINCT on indexes (for expressional index columns), and (b) we want + * to allow SET DISTINCT on system catalogs without requiring + * allowSystemTableMods to be turned on. + */ + if (rel->rd_rel->relkind != RELKIND_RELATION && + rel->rd_rel->relkind != RELKIND_INDEX) + ereport(ERROR, + (errcode(ERRCODE_WRONG_OBJECT_TYPE), + errmsg("\"%s\" is not a table or index", + RelationGetRelationName(rel)))); + + /* Permissions checks */ + if (!pg_class_ownercheck(RelationGetRelid(rel), GetUserId())) + aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_CLASS, + RelationGetRelationName(rel)); +} + +static void +ATExecSetDistinct(Relation rel, const char *colName, Node *newValue) +{ + float4 newdistinct; + Relation attrelation; + HeapTuple tuple; + Form_pg_attribute attrtuple; + + switch (nodeTag(newValue)) + { + case T_Integer: + newdistinct = intVal(newValue); + break; + case T_Float: + newdistinct = floatVal(newValue); + break; + default: + elog(ERROR, "unrecognized node type: %d", + (int) nodeTag(newValue)); + newdistinct = 0; /* keep compiler quiet */ + break; + } + + /* + * Limit ndistinct to sane values + */ + if (newdistinct < -1.0) + { + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("number of distinct values %g is too low", + newdistinct))); + } + + attrelation = heap_open(AttributeRelationId, RowExclusiveLock); + + tuple = SearchSysCacheCopyAttName(RelationGetRelid(rel), colName); + + if (!HeapTupleIsValid(tuple)) + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_COLUMN), + errmsg("column \"%s\" of relation \"%s\" does not exist", + colName, RelationGetRelationName(rel)))); + attrtuple = (Form_pg_attribute) GETSTRUCT(tuple); + + if (attrtuple->attnum <= 0) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot alter system column \"%s\"", + colName))); + + attrtuple->attdistinct = newdistinct; + + simple_heap_update(attrelation, &tuple->t_self, tuple); + + /* keep system catalog indexes current */ + CatalogUpdateIndexes(attrelation, tuple); + + heap_freetuple(tuple); + + heap_close(attrelation, RowExclusiveLock); +} + +/* * ALTER TABLE ALTER COLUMN SET STORAGE */ static void diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 543aea99283..6e52d3bcbd3 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.675 2009/07/30 02:45:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.676 2009/08/02 22:14:52 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -1605,6 +1605,15 @@ alter_table_cmd: n->def = (Node *) makeInteger($6); $$ = (Node *)n; } + /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS DISTINCT <NumericOnly> */ + | ALTER opt_column ColId SET STATISTICS DISTINCT NumericOnly + { + AlterTableCmd *n = makeNode(AlterTableCmd); + n->subtype = AT_SetDistinct; + n->name = $3; + n->def = (Node *) $7; + $$ = (Node *)n; + } /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */ | ALTER opt_column ColId SET STORAGE ColId { diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index b1883efe755..360eaf1caf7 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.543 2009/07/29 20:56:19 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.544 2009/08/02 22:14:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4707,6 +4707,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) int i_atttypname; int i_atttypmod; int i_attstattarget; + int i_attdistinct; int i_attstorage; int i_typstorage; int i_attnotnull; @@ -4752,11 +4753,28 @@ getTableAttrs(TableInfo *tblinfo, int numTables) resetPQExpBuffer(q); - if (g_fout->remoteVersion >= 70300) + if (g_fout->remoteVersion >= 80500) + { + /* attdistinct is new in 8.5 */ + appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, " + "a.attstattarget, a.attdistinct, " + "a.attstorage, t.typstorage, " + "a.attnotnull, a.atthasdef, a.attisdropped, " + "a.attlen, a.attalign, a.attislocal, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "ON a.atttypid = t.oid " + "WHERE a.attrelid = '%u'::pg_catalog.oid " + "AND a.attnum > 0::pg_catalog.int2 " + "ORDER BY a.attrelid, a.attnum", + tbinfo->dobj.catId.oid); + } + else if (g_fout->remoteVersion >= 70300) { /* need left join here to not fail on dropped columns ... */ appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, " - "a.attstattarget, a.attstorage, t.typstorage, " + "a.attstattarget, 0 AS attdistinct, " + "a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname " @@ -4774,8 +4792,9 @@ getTableAttrs(TableInfo *tblinfo, int numTables) * we don't dump it because we can't tell whether it's been * explicitly set or was just a default. */ - appendPQExpBuffer(q, "SELECT a.attnum, a.attname, " - "a.atttypmod, -1 AS attstattarget, a.attstorage, " + appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, " + "-1 AS attstattarget, 0 AS attdistinct, " + "a.attstorage, " "t.typstorage, a.attnotnull, a.atthasdef, " "false AS attisdropped, a.attlen, " "a.attalign, false AS attislocal, " @@ -4791,8 +4810,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables) { /* format_type not available before 7.1 */ appendPQExpBuffer(q, "SELECT attnum, attname, atttypmod, " - "-1 AS attstattarget, attstorage, " - "attstorage AS typstorage, " + "-1 AS attstattarget, 0 AS attdistinct, " + "attstorage, attstorage AS typstorage, " "attnotnull, atthasdef, false AS attisdropped, " "attlen, attalign, " "false AS attislocal, " @@ -4814,6 +4833,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) i_atttypname = PQfnumber(res, "atttypname"); i_atttypmod = PQfnumber(res, "atttypmod"); i_attstattarget = PQfnumber(res, "attstattarget"); + i_attdistinct = PQfnumber(res, "attdistinct"); i_attstorage = PQfnumber(res, "attstorage"); i_typstorage = PQfnumber(res, "typstorage"); i_attnotnull = PQfnumber(res, "attnotnull"); @@ -4828,6 +4848,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) tbinfo->atttypnames = (char **) malloc(ntups * sizeof(char *)); tbinfo->atttypmod = (int *) malloc(ntups * sizeof(int)); tbinfo->attstattarget = (int *) malloc(ntups * sizeof(int)); + tbinfo->attdistinct = (float4 *) malloc(ntups * sizeof(float4)); tbinfo->attstorage = (char *) malloc(ntups * sizeof(char)); tbinfo->typstorage = (char *) malloc(ntups * sizeof(char)); tbinfo->attisdropped = (bool *) malloc(ntups * sizeof(bool)); @@ -4853,6 +4874,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables) tbinfo->atttypnames[j] = strdup(PQgetvalue(res, j, i_atttypname)); tbinfo->atttypmod[j] = atoi(PQgetvalue(res, j, i_atttypmod)); tbinfo->attstattarget[j] = atoi(PQgetvalue(res, j, i_attstattarget)); + tbinfo->attdistinct[j] = strtod(PQgetvalue(res, j, i_attdistinct), + (char **) NULL); tbinfo->attstorage[j] = *(PQgetvalue(res, j, i_attstorage)); tbinfo->typstorage[j] = *(PQgetvalue(res, j, i_typstorage)); tbinfo->attisdropped[j] = (PQgetvalue(res, j, i_attisdropped)[0] == 't'); @@ -10190,6 +10213,22 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) } /* + * Dump per-column ndistinct information. We only issue an ALTER + * TABLE statement if the attdistinct entry for this column is + * non-zero (i.e. it's not the default value) + */ + if (tbinfo->attdistinct[j] != 0 && + !tbinfo->attisdropped[j]) + { + appendPQExpBuffer(q, "ALTER TABLE ONLY %s ", + fmtId(tbinfo->dobj.name)); + appendPQExpBuffer(q, "ALTER COLUMN %s ", + fmtId(tbinfo->attnames[j])); + appendPQExpBuffer(q, "SET STATISTICS DISTINCT %g;\n", + tbinfo->attdistinct[j]); + } + + /* * Dump per-column storage information. The statement is only * dumped if the storage has been changed from the type's default. */ diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index b6702cf5186..6b84d59723d 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.155 2009/07/29 20:56:19 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.156 2009/08/02 22:14:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -243,6 +243,7 @@ typedef struct _tableInfo char **atttypnames; /* attribute type names */ int *atttypmod; /* type-specific type modifiers */ int *attstattarget; /* attribute statistics targets */ + float4 *attdistinct; /* override ndistinct calculation */ char *attstorage; /* attribute storage scheme */ char *typstorage; /* type storage scheme */ bool *attisdropped; /* true if attr is dropped; don't dump it */ diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 6af3f2f1ea6..ef418bdcab8 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.184 2009/06/11 14:49:08 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.185 2009/08/02 22:14:52 tgl Exp $ */ /*---------------------------------------------------------------------- @@ -674,12 +674,10 @@ psql_completion(char *text, int start, int end) else if (pg_strcasecmp(prev_wd, "CREATE") == 0) matches = completion_matches(text, create_command_generator); -/* DROP, except ALTER (TABLE|DOMAIN|GROUP) sth DROP */ +/* DROP, but watch out for DROP embedded in other commands */ /* complete with something you can drop */ else if (pg_strcasecmp(prev_wd, "DROP") == 0 && - pg_strcasecmp(prev3_wd, "TABLE") != 0 && - pg_strcasecmp(prev3_wd, "DOMAIN") != 0 && - pg_strcasecmp(prev3_wd, "GROUP") != 0) + pg_strcasecmp(prev2_wd, "DROP") == 0) matches = completion_matches(text, drop_command_generator); /* ALTER */ @@ -967,13 +965,44 @@ psql_completion(char *text, int start, int end) (pg_strcasecmp(prev4_wd, "TABLE") == 0 && pg_strcasecmp(prev2_wd, "ALTER") == 0)) { - /* DROP ... does not work well yet */ static const char *const list_COLUMNALTER[] = - {"TYPE", "SET DEFAULT", "DROP DEFAULT", "SET NOT NULL", - "DROP NOT NULL", "SET STATISTICS", "SET STORAGE", NULL}; + {"TYPE", "SET", "DROP", NULL}; COMPLETE_WITH_LIST(list_COLUMNALTER); } + else if (((pg_strcasecmp(prev4_wd, "ALTER") == 0 && + pg_strcasecmp(prev3_wd, "COLUMN") == 0) || + (pg_strcasecmp(prev5_wd, "TABLE") == 0 && + pg_strcasecmp(prev3_wd, "ALTER") == 0)) && + pg_strcasecmp(prev_wd, "SET") == 0) + { + static const char *const list_COLUMNSET[] = + {"DEFAULT", "NOT NULL", "STATISTICS", "STORAGE", NULL}; + + COMPLETE_WITH_LIST(list_COLUMNSET); + } + else if (((pg_strcasecmp(prev5_wd, "ALTER") == 0 && + pg_strcasecmp(prev4_wd, "COLUMN") == 0) || + pg_strcasecmp(prev4_wd, "ALTER") == 0) && + pg_strcasecmp(prev2_wd, "SET") == 0 && + pg_strcasecmp(prev_wd, "STATISTICS") == 0) + { + static const char *const list_COLUMNSETSTATS[] = + {"DISTINCT", NULL}; + + COMPLETE_WITH_LIST(list_COLUMNSETSTATS); + } + else if (((pg_strcasecmp(prev4_wd, "ALTER") == 0 && + pg_strcasecmp(prev3_wd, "COLUMN") == 0) || + (pg_strcasecmp(prev5_wd, "TABLE") == 0 && + pg_strcasecmp(prev3_wd, "ALTER") == 0)) && + pg_strcasecmp(prev_wd, "DROP") == 0) + { + static const char *const list_COLUMNDROP[] = + {"DEFAULT", "NOT NULL", NULL}; + + COMPLETE_WITH_LIST(list_COLUMNDROP); + } else if (pg_strcasecmp(prev3_wd, "TABLE") == 0 && pg_strcasecmp(prev_wd, "CLUSTER") == 0) COMPLETE_WITH_CONST("ON"); diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 847362ad273..dc1b41d06bb 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.534 2009/07/29 20:56:19 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.535 2009/08/02 22:14:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200907291 +#define CATALOG_VERSION_NO 200908021 #endif diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index e1c6fc83731..ce6da9acdf4 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.149 2009/07/29 20:56:20 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.150 2009/08/02 22:14:52 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -60,6 +60,13 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS int4 attstattarget; /* + * attdistinct, if nonzero, is a user-specified ndistinct value to be used + * instead of estimating the number of distinct values during ANALYZE. + * Nonzero values have the same meanings as for pg_statistic.stadistinct. + */ + float4 attdistinct; + + /* * attlen is a copy of the typlen field from pg_type for this attribute. * See atttypid comments above. */ @@ -176,25 +183,26 @@ typedef FormData_pg_attribute *Form_pg_attribute; * ---------------- */ -#define Natts_pg_attribute 18 +#define Natts_pg_attribute 19 #define Anum_pg_attribute_attrelid 1 #define Anum_pg_attribute_attname 2 #define Anum_pg_attribute_atttypid 3 #define Anum_pg_attribute_attstattarget 4 -#define Anum_pg_attribute_attlen 5 -#define Anum_pg_attribute_attnum 6 -#define Anum_pg_attribute_attndims 7 -#define Anum_pg_attribute_attcacheoff 8 -#define Anum_pg_attribute_atttypmod 9 -#define Anum_pg_attribute_attbyval 10 -#define Anum_pg_attribute_attstorage 11 -#define Anum_pg_attribute_attalign 12 -#define Anum_pg_attribute_attnotnull 13 -#define Anum_pg_attribute_atthasdef 14 -#define Anum_pg_attribute_attisdropped 15 -#define Anum_pg_attribute_attislocal 16 -#define Anum_pg_attribute_attinhcount 17 -#define Anum_pg_attribute_attacl 18 +#define Anum_pg_attribute_attdistinct 5 +#define Anum_pg_attribute_attlen 6 +#define Anum_pg_attribute_attnum 7 +#define Anum_pg_attribute_attndims 8 +#define Anum_pg_attribute_attcacheoff 9 +#define Anum_pg_attribute_atttypmod 10 +#define Anum_pg_attribute_attbyval 11 +#define Anum_pg_attribute_attstorage 12 +#define Anum_pg_attribute_attalign 13 +#define Anum_pg_attribute_attnotnull 14 +#define Anum_pg_attribute_atthasdef 15 +#define Anum_pg_attribute_attisdropped 16 +#define Anum_pg_attribute_attislocal 17 +#define Anum_pg_attribute_attinhcount 18 +#define Anum_pg_attribute_attacl 19 /* ---------------- @@ -212,248 +220,250 @@ typedef FormData_pg_attribute *Form_pg_attribute; * ---------------- */ #define Schema_pg_type \ -{ 1247, {"typname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typowner"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typlen"}, 21, -1, 2, 4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typbyval"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typtype"}, 18, -1, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typcategory"}, 18, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typispreferred"},16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typisdefined"}, 16, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typdelim"}, 18, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typrelid"}, 26, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typelem"}, 26, -1, 4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typarray"}, 26, -1, 4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typinput"}, 24, -1, 4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typoutput"}, 24, -1, 4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typreceive"}, 24, -1, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typsend"}, 24, -1, 4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typmodin"}, 24, -1, 4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typmodout"}, 24, -1, 4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typanalyze"}, 24, -1, 4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typalign"}, 18, -1, 1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typstorage"}, 18, -1, 1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typnotnull"}, 16, -1, 1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typbasetype"}, 26, -1, 4, 24, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typtypmod"}, 23, -1, 4, 25, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typndims"}, 23, -1, 4, 26, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1247, {"typdefaultbin"}, 25, -1, -1, 27, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1247, {"typdefault"}, 25, -1, -1, 28, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } - -DATA(insert ( 1247 typname 19 -1 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); -DATA(insert ( 1247 typnamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typowner 26 -1 4 3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typlen 21 -1 2 4 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1247 typbyval 16 -1 1 5 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typtype 18 -1 1 6 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typcategory 18 -1 1 7 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typispreferred 16 -1 1 8 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typisdefined 16 -1 1 9 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typdelim 18 -1 1 10 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typrelid 26 -1 4 11 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typelem 26 -1 4 12 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typarray 26 -1 4 13 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typinput 24 -1 4 14 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typoutput 24 -1 4 15 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typreceive 24 -1 4 16 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typsend 24 -1 4 17 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typmodin 24 -1 4 18 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typmodout 24 -1 4 19 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typanalyze 24 -1 4 20 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typalign 18 -1 1 21 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typstorage 18 -1 1 22 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typnotnull 16 -1 1 23 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1247 typbasetype 26 -1 4 24 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typtypmod 23 -1 4 25 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typndims 23 -1 4 26 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 typdefaultbin 25 -1 -1 27 0 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1247 typdefault 25 -1 -1 28 0 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1247 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); -DATA(insert ( 1247 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); +{ 1247, {"typname"}, 19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typnamespace"}, 26, -1, 0, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typowner"}, 26, -1, 0, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typlen"}, 21, -1, 0, 2, 4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typbyval"}, 16, -1, 0, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typtype"}, 18, -1, 0, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typcategory"}, 18, -1, 0, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typispreferred"},16, -1, 0, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typisdefined"}, 16, -1, 0, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typdelim"}, 18, -1, 0, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typrelid"}, 26, -1, 0, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typelem"}, 26, -1, 0, 4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typarray"}, 26, -1, 0, 4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typinput"}, 24, -1, 0, 4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typoutput"}, 24, -1, 0, 4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typreceive"}, 24, -1, 0, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typsend"}, 24, -1, 0, 4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typmodin"}, 24, -1, 0, 4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typmodout"}, 24, -1, 0, 4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typanalyze"}, 24, -1, 0, 4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typalign"}, 18, -1, 0, 1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typstorage"}, 18, -1, 0, 1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typnotnull"}, 16, -1, 0, 1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typbasetype"}, 26, -1, 0, 4, 24, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typtypmod"}, 23, -1, 0, 4, 25, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typndims"}, 23, -1, 0, 4, 26, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1247, {"typdefaultbin"}, 25, -1, 0, -1, 27, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1247, {"typdefault"}, 25, -1, 0, -1, 28, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } + +DATA(insert ( 1247 typname 19 -1 0 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); +DATA(insert ( 1247 typnamespace 26 -1 0 4 2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typowner 26 -1 0 4 3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typlen 21 -1 0 2 4 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1247 typbyval 16 -1 0 1 5 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typtype 18 -1 0 1 6 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typcategory 18 -1 0 1 7 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typispreferred 16 -1 0 1 8 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typisdefined 16 -1 0 1 9 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typdelim 18 -1 0 1 10 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typrelid 26 -1 0 4 11 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typelem 26 -1 0 4 12 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typarray 26 -1 0 4 13 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typinput 24 -1 0 4 14 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typoutput 24 -1 0 4 15 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typreceive 24 -1 0 4 16 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typsend 24 -1 0 4 17 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typmodin 24 -1 0 4 18 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typmodout 24 -1 0 4 19 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typanalyze 24 -1 0 4 20 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typalign 18 -1 0 1 21 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typstorage 18 -1 0 1 22 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typnotnull 16 -1 0 1 23 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1247 typbasetype 26 -1 0 4 24 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typtypmod 23 -1 0 4 25 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typndims 23 -1 0 4 26 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 typdefaultbin 25 -1 0 -1 27 0 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1247 typdefault 25 -1 0 -1 28 0 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1247 ctid 27 0 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); +DATA(insert ( 1247 oid 26 0 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 xmin 28 0 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 cmin 29 0 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 xmax 28 0 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 cmax 29 0 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1247 tableoid 26 0 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); /* ---------------- * pg_proc * ---------------- */ #define Schema_pg_proc \ -{ 1255, {"proname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proowner"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"prolang"}, 26, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"procost"}, 700, -1, 4, 5, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"prorows"}, 700, -1, 4, 6, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"provariadic"}, 26, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proisagg"}, 16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proiswindow"}, 16, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"prosecdef"}, 16, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proisstrict"}, 16, -1, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proretset"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"provolatile"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"pronargs"}, 21, -1, 2, 14, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"pronargdefaults"}, 21, -1, 2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"prorettype"}, 26, -1, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proargtypes"}, 30, -1, -1, 17, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1255, {"proallargtypes"}, 1028, -1, -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"proargmodes"}, 1002, -1, -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"proargnames"}, 1009, -1, -1, 20, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"proargdefaults"}, 25, -1, -1, 21, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"prosrc"}, 25, -1, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"probin"}, 17, -1, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"proconfig"}, 1009, -1, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1255, {"proacl"}, 1034, -1, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } - -DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); -DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 proowner 26 -1 4 3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 prolang 26 -1 4 4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 procost 700 -1 4 5 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); -DATA(insert ( 1255 prorows 700 -1 4 6 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); -DATA(insert ( 1255 provariadic 26 -1 4 7 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 proisagg 16 -1 1 8 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 proiswindow 16 -1 1 9 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 prosecdef 16 -1 1 10 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 proisstrict 16 -1 1 11 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 proretset 16 -1 1 12 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 provolatile 18 -1 1 13 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1255 pronargs 21 -1 2 14 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1255 pronargdefaults 21 -1 2 15 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1255 prorettype 26 -1 4 16 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 proargtypes 30 -1 -1 17 1 -1 -1 f p i t f f t 0 _null_)); -DATA(insert ( 1255 proallargtypes 1028 -1 -1 18 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 proargmodes 1002 -1 -1 19 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 proargnames 1009 -1 -1 20 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 proargdefaults 25 -1 -1 21 0 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 prosrc 25 -1 -1 22 0 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 probin 17 -1 -1 23 0 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 proconfig 1009 -1 -1 24 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 proacl 1034 -1 -1 25 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1255 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); -DATA(insert ( 1255 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1255 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); +{ 1255, {"proname"}, 19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"pronamespace"}, 26, -1, 0, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proowner"}, 26, -1, 0, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"prolang"}, 26, -1, 0, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"procost"}, 700, -1, 0, 4, 5, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"prorows"}, 700, -1, 0, 4, 6, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"provariadic"}, 26, -1, 0, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proisagg"}, 16, -1, 0, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proiswindow"}, 16, -1, 0, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"prosecdef"}, 16, -1, 0, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proisstrict"}, 16, -1, 0, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proretset"}, 16, -1, 0, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"provolatile"}, 18, -1, 0, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"pronargs"}, 21, -1, 0, 2, 14, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"pronargdefaults"}, 21, -1, 0, 2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"prorettype"}, 26, -1, 0, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proargtypes"}, 30, -1, 0, -1, 17, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1255, {"proallargtypes"}, 1028, -1, 0, -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"proargmodes"}, 1002, -1, 0, -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"proargnames"}, 1009, -1, 0, -1, 20, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"proargdefaults"}, 25, -1, 0, -1, 21, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"prosrc"}, 25, -1, 0, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"probin"}, 17, -1, 0, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"proconfig"}, 1009, -1, 0, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1255, {"proacl"}, 1034, -1, 0, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } + +DATA(insert ( 1255 proname 19 -1 0 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); +DATA(insert ( 1255 pronamespace 26 -1 0 4 2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 proowner 26 -1 0 4 3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 prolang 26 -1 0 4 4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 procost 700 -1 0 4 5 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); +DATA(insert ( 1255 prorows 700 -1 0 4 6 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); +DATA(insert ( 1255 provariadic 26 -1 0 4 7 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 proisagg 16 -1 0 1 8 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 proiswindow 16 -1 0 1 9 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 prosecdef 16 -1 0 1 10 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 proisstrict 16 -1 0 1 11 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 proretset 16 -1 0 1 12 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 provolatile 18 -1 0 1 13 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1255 pronargs 21 -1 0 2 14 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1255 pronargdefaults 21 -1 0 2 15 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1255 prorettype 26 -1 0 4 16 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 proargtypes 30 -1 0 -1 17 1 -1 -1 f p i t f f t 0 _null_)); +DATA(insert ( 1255 proallargtypes 1028 -1 0 -1 18 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 proargmodes 1002 -1 0 -1 19 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 proargnames 1009 -1 0 -1 20 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 proargdefaults 25 -1 0 -1 21 0 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 prosrc 25 -1 0 -1 22 0 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 probin 17 -1 0 -1 23 0 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 proconfig 1009 -1 0 -1 24 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 proacl 1034 -1 0 -1 25 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1255 ctid 27 0 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); +DATA(insert ( 1255 oid 26 0 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 xmin 28 0 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 cmin 29 0 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 xmax 28 0 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 cmax 29 0 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1255 tableoid 26 0 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); /* ---------------- * pg_attribute * ---------------- */ #define Schema_pg_attribute \ -{ 1249, {"attrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attname"}, 19, -1, NAMEDATALEN, 2, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"atttypid"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attstattarget"}, 23, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attlen"}, 21, -1, 2, 5, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attnum"}, 21, -1, 2, 6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attndims"}, 23, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attcacheoff"}, 23, -1, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"atttypmod"}, 23, -1, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attbyval"}, 16, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attstorage"}, 18, -1, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attalign"}, 18, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attnotnull"}, 16, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"atthasdef"}, 16, -1, 1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attisdropped"}, 16, -1, 1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attislocal"}, 16, -1, 1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attinhcount"}, 23, -1, 4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1249, {"attacl"}, 1034, -1, -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } - -DATA(insert ( 1249 attrelid 26 -1 4 1 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attname 19 -1 NAMEDATALEN 2 0 -1 -1 f p c t f f t 0 _null_)); -DATA(insert ( 1249 atttypid 26 -1 4 3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attstattarget 23 -1 4 4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attlen 21 -1 2 5 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1249 attnum 21 -1 2 6 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1249 attndims 23 -1 4 7 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attcacheoff 23 -1 4 8 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 atttypmod 23 -1 4 9 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attbyval 16 -1 1 10 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attstorage 18 -1 1 11 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attalign 18 -1 1 12 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attnotnull 16 -1 1 13 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 atthasdef 16 -1 1 14 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attisdropped 16 -1 1 15 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attislocal 16 -1 1 16 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1249 attinhcount 23 -1 4 17 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 attacl 1034 -1 -1 18 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1249 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); +{ 1249, {"attrelid"}, 26, -1, 0, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attname"}, 19, -1, 0, NAMEDATALEN, 2, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"atttypid"}, 26, -1, 0, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attstattarget"}, 23, -1, 0, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attdistinct"}, 700, -1, 0, 4, 5, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attlen"}, 21, -1, 0, 2, 6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attnum"}, 21, -1, 0, 2, 7, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attndims"}, 23, -1, 0, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attcacheoff"}, 23, -1, 0, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"atttypmod"}, 23, -1, 0, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attbyval"}, 16, -1, 0, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attstorage"}, 18, -1, 0, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attalign"}, 18, -1, 0, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attnotnull"}, 16, -1, 0, 1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"atthasdef"}, 16, -1, 0, 1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attisdropped"}, 16, -1, 0, 1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attislocal"}, 16, -1, 0, 1, 17, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attinhcount"}, 23, -1, 0, 4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1249, {"attacl"}, 1034, -1, 0, -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } + +DATA(insert ( 1249 attrelid 26 -1 0 4 1 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attname 19 -1 0 NAMEDATALEN 2 0 -1 -1 f p c t f f t 0 _null_)); +DATA(insert ( 1249 atttypid 26 -1 0 4 3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attstattarget 23 -1 0 4 4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attdistinct 700 -1 0 4 5 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); +DATA(insert ( 1249 attlen 21 -1 0 2 6 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1249 attnum 21 -1 0 2 7 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1249 attndims 23 -1 0 4 8 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attcacheoff 23 -1 0 4 9 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 atttypmod 23 -1 0 4 10 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attbyval 16 -1 0 1 11 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attstorage 18 -1 0 1 12 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attalign 18 -1 0 1 13 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attnotnull 16 -1 0 1 14 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 atthasdef 16 -1 0 1 15 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attisdropped 16 -1 0 1 16 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attislocal 16 -1 0 1 17 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1249 attinhcount 23 -1 0 4 18 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 attacl 1034 -1 0 -1 19 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1249 ctid 27 0 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); /* no OIDs in pg_attribute */ -DATA(insert ( 1249 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 xmin 28 0 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 cmin 29 0 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 xmax 28 0 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 cmax 29 0 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1249 tableoid 26 0 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); /* ---------------- * pg_class * ---------------- */ #define Schema_pg_class \ -{ 1259, {"relname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"reltype"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relowner"}, 26, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relam"}, 26, -1, 4, 5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relfilenode"}, 26, -1, 4, 6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"reltablespace"}, 26, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relpages"}, 23, -1, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"reltuples"}, 700, -1, 4, 9, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"reltoastrelid"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"reltoastidxid"}, 26, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhasindex"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relisshared"}, 16, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relistemp"}, 16, -1, 1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relkind"}, 18, -1, 1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relnatts"}, 21, -1, 2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relchecks"}, 21, -1, 2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhasoids"}, 16, -1, 1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhaspkey"}, 16, -1, 1, 19, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhasrules"}, 16, -1, 1, 20, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhastriggers"},16, -1, 1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relhassubclass"},16, -1, 1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relfrozenxid"}, 28, -1, 4, 23, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 1259, {"relacl"}, 1034, -1, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 1259, {"reloptions"}, 1009, -1, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } - -DATA(insert ( 1259 relname 19 -1 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); -DATA(insert ( 1259 relnamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 reltype 26 -1 4 3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relowner 26 -1 4 4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relam 26 -1 4 5 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relfilenode 26 -1 4 6 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 reltablespace 26 -1 4 7 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relpages 23 -1 4 8 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 reltuples 700 -1 4 9 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); -DATA(insert ( 1259 reltoastrelid 26 -1 4 10 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 reltoastidxid 26 -1 4 11 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relhasindex 16 -1 1 12 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relisshared 16 -1 1 13 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relistemp 16 -1 1 14 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relkind 18 -1 1 15 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relnatts 21 -1 2 16 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1259 relchecks 21 -1 2 17 0 -1 -1 t p s t f f t 0 _null_)); -DATA(insert ( 1259 relhasoids 16 -1 1 18 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relhaspkey 16 -1 1 19 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relhasrules 16 -1 1 20 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relhastriggers 16 -1 1 21 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relhassubclass 16 -1 1 22 0 -1 -1 t p c t f f t 0 _null_)); -DATA(insert ( 1259 relfrozenxid 28 -1 4 23 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 relacl 1034 -1 -1 24 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1259 reloptions 1009 -1 -1 25 1 -1 -1 f x i f f f t 0 _null_)); -DATA(insert ( 1259 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); -DATA(insert ( 1259 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); -DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); +{ 1259, {"relname"}, 19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relnamespace"}, 26, -1, 0, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"reltype"}, 26, -1, 0, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relowner"}, 26, -1, 0, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relam"}, 26, -1, 0, 4, 5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relfilenode"}, 26, -1, 0, 4, 6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"reltablespace"}, 26, -1, 0, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relpages"}, 23, -1, 0, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"reltuples"}, 700, -1, 0, 4, 9, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"reltoastrelid"}, 26, -1, 0, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"reltoastidxid"}, 26, -1, 0, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhasindex"}, 16, -1, 0, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relisshared"}, 16, -1, 0, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relistemp"}, 16, -1, 0, 1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relkind"}, 18, -1, 0, 1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relnatts"}, 21, -1, 0, 2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relchecks"}, 21, -1, 0, 2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhasoids"}, 16, -1, 0, 1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhaspkey"}, 16, -1, 0, 1, 19, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhasrules"}, 16, -1, 0, 1, 20, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhastriggers"},16, -1, 0, 1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relhassubclass"},16, -1, 0, 1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relfrozenxid"}, 28, -1, 0, 4, 23, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 1259, {"relacl"}, 1034, -1, 0, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 1259, {"reloptions"}, 1009, -1, 0, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } + +DATA(insert ( 1259 relname 19 -1 0 NAMEDATALEN 1 0 -1 -1 f p c t f f t 0 _null_)); +DATA(insert ( 1259 relnamespace 26 -1 0 4 2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 reltype 26 -1 0 4 3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relowner 26 -1 0 4 4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relam 26 -1 0 4 5 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relfilenode 26 -1 0 4 6 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 reltablespace 26 -1 0 4 7 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relpages 23 -1 0 4 8 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 reltuples 700 -1 0 4 9 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_)); +DATA(insert ( 1259 reltoastrelid 26 -1 0 4 10 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 reltoastidxid 26 -1 0 4 11 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relhasindex 16 -1 0 1 12 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relisshared 16 -1 0 1 13 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relistemp 16 -1 0 1 14 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relkind 18 -1 0 1 15 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relnatts 21 -1 0 2 16 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1259 relchecks 21 -1 0 2 17 0 -1 -1 t p s t f f t 0 _null_)); +DATA(insert ( 1259 relhasoids 16 -1 0 1 18 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relhaspkey 16 -1 0 1 19 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relhasrules 16 -1 0 1 20 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relhastriggers 16 -1 0 1 21 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relhassubclass 16 -1 0 1 22 0 -1 -1 t p c t f f t 0 _null_)); +DATA(insert ( 1259 relfrozenxid 28 -1 0 4 23 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 relacl 1034 -1 0 -1 24 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1259 reloptions 1009 -1 0 -1 25 1 -1 -1 f x i f f f t 0 _null_)); +DATA(insert ( 1259 ctid 27 0 0 6 -1 0 -1 -1 f p s t f f t 0 _null_)); +DATA(insert ( 1259 oid 26 0 0 4 -2 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 xmin 28 0 0 4 -3 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 cmin 29 0 0 4 -4 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 xmax 28 0 0 4 -5 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 cmax 29 0 0 4 -6 0 -1 -1 t p i t f f t 0 _null_)); +DATA(insert ( 1259 tableoid 26 0 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); /* ---------------- * pg_index @@ -464,20 +474,20 @@ DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0 _null_)); * ---------------- */ #define Schema_pg_index \ -{ 0, {"indexrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indrelid"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indnatts"}, 21, -1, 2, 3, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indisunique"}, 16, -1, 1, 4, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indisprimary"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indimmediate"}, 16, -1, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indisclustered"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indisvalid"}, 16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indcheckxmin"}, 16, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indisready"}, 16, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indkey"}, 22, -1, -1, 11, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indclass"}, 30, -1, -1, 12, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indoption"}, 22, -1, -1, 13, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ -{ 0, {"indexprs"}, 25, -1, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ -{ 0, {"indpred"}, 25, -1, -1, 15, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } +{ 0, {"indexrelid"}, 26, -1, 0, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indrelid"}, 26, -1, 0, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indnatts"}, 21, -1, 0, 2, 3, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indisunique"}, 16, -1, 0, 1, 4, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indisprimary"}, 16, -1, 0, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indimmediate"}, 16, -1, 0, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indisclustered"}, 16, -1, 0, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indisvalid"}, 16, -1, 0, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indcheckxmin"}, 16, -1, 0, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indisready"}, 16, -1, 0, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indkey"}, 22, -1, 0, -1, 11, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indclass"}, 30, -1, 0, -1, 12, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indoption"}, 22, -1, 0, -1, 13, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \ +{ 0, {"indexprs"}, 25, -1, 0, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \ +{ 0, {"indpred"}, 25, -1, 0, -1, 15, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } } #endif /* PG_ATTRIBUTE_H */ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 1aeb324e3b5..15a3b5f8d31 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.114 2009/06/11 14:49:09 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.115 2009/08/02 22:14:53 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -125,7 +125,7 @@ typedef FormData_pg_class *Form_pg_class; /* Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId */ DATA(insert OID = 1247 ( pg_type PGNSP 71 PGUID 0 1247 0 0 0 0 0 f f f r 28 0 t f f f f 3 _null_ _null_ )); DESCR(""); -DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 0 f f f r 18 0 f f f f f 3 _null_ _null_ )); +DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 0 f f f r 19 0 f f f f f 3 _null_ _null_ )); DESCR(""); DATA(insert OID = 1255 ( pg_proc PGNSP 81 PGUID 0 1255 0 0 0 0 0 f f f r 25 0 t f f f f 3 _null_ _null_ )); DESCR(""); diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index d0573455a05..f0b3941abf8 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.400 2009/07/30 02:45:38 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.401 2009/08/02 22:14:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1098,8 +1098,9 @@ typedef enum AlterTableType AT_ColumnDefault, /* alter column default */ AT_DropNotNull, /* alter column drop not null */ AT_SetNotNull, /* alter column set not null */ - AT_SetStatistics, /* alter column statistics */ - AT_SetStorage, /* alter column storage */ + AT_SetStatistics, /* alter column set statistics */ + AT_SetDistinct, /* alter column set statistics distinct */ + AT_SetStorage, /* alter column set storage */ AT_DropColumn, /* drop column */ AT_DropColumnRecurse, /* internal to commands/tablecmds.c */ AT_AddIndex, /* add index */ |