mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +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:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.190 2010/01/02 21:28:46 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.191 2010/01/22 16:40:19 rhaas Exp $
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -992,17 +992,6 @@ psql_completion(char *text, int start, int end)
|
||||
|
||||
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 &&
|
||||
|
Reference in New Issue
Block a user