1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Allow SET STATISTICS on expression indexes

Index columns are referenced by ordinal number rather than name, e.g.
CREATE INDEX coord_idx ON measured (x, y, (z + t));
ALTER INDEX coord_idx ALTER COLUMN 3 SET STATISTICS 1000;

Incompatibility note for release notes:
\d+ for indexes now also displays Stats Target

Authors: Alexander Korotkov, with contribution by Adrien NAYRAT
Review: Adrien NAYRAT, Simon Riggs
Wordsmith: Simon Riggs
This commit is contained in:
Simon Riggs
2017-09-06 13:46:01 -07:00
parent e09db94c0a
commit 5b6d13eec7
13 changed files with 201 additions and 17 deletions

View File

@@ -1777,6 +1777,8 @@ typedef struct AlterTableCmd /* one subcommand of an ALTER TABLE */
AlterTableType subtype; /* Type of table alteration to apply */
char *name; /* column, constraint, or trigger to act on,
* or tablespace */
int16 num; /* attribute number for columns referenced
* by number */
RoleSpec *newowner;
Node *def; /* definition of new column, index,
* constraint, or parent table */