public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 12/18] doc review: piecemeal construction of partitioned indexes 3+ messages / 3 participants [nested] [flat]
* [PATCH 12/18] doc review: piecemeal construction of partitioned indexes @ 2021-02-03 06:51 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Justin Pryzby @ 2021-02-03 06:51 UTC (permalink / raw) 5efd604ec0a3bdde98fe19d8cada69ab4ef80db3 backpatch to v11 --- doc/src/sgml/ddl.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 1e9a4625cc..a8cbd45d35 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -3962,8 +3962,8 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 As explained above, it is possible to create indexes on partitioned tables so that they are applied automatically to the entire hierarchy. This is very - convenient, as not only will the existing partitions become indexed, but - also any partitions that are created in the future will. One limitation is + convenient, as not only the existing partitions will be indexed, but + so will any partitions that are created in the future. One limitation is that it's not possible to use the <literal>CONCURRENTLY</literal> qualifier when creating such a partitioned index. To avoid long lock times, it is possible to use <command>CREATE INDEX ON ONLY</command> -- 2.17.0 --lc9FT7cWel8HagAv Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0013-doc-review-for-FDW-bulk-inserts.patch" ^ permalink raw reply [nested|flat] 3+ messages in thread
* CREATE MATERIALIZED VIEW @ 2024-07-25 11:48 px shi <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: px shi @ 2024-07-25 11:48 UTC (permalink / raw) To: pgsql-hackers Hi, I see that materialized view cannot be unlogged now, but when I use psql and type CREATE UNLOGGED, pressing the Tab key for auto-completion suggests `TABLE` and MATERIALIZED VIEW. Shouldn't `MATERIALIZED VIEW ` be suggested? ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE MATERIALIZED VIEW @ 2024-07-25 13:56 Dagfinn Ilmari Mannsåker <[email protected]> parent: px shi <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Dagfinn Ilmari Mannsåker @ 2024-07-25 13:56 UTC (permalink / raw) To: px shi <[email protected]>; +Cc: pgsql-hackers px shi <[email protected]> writes: > Hi, I see that materialized view cannot be unlogged now, but when I use > psql and type CREATE UNLOGGED, pressing the Tab key for auto-completion > suggests `TABLE` and MATERIALIZED VIEW. > Shouldn't `MATERIALIZED VIEW ` be suggested? That's my fault, I added it in commit c951e9042dd1, presumably because the grammar allows it, but it turns transformCreateTableAsStmt() rejects it. Attached is a patch to fix it, which sholud be backpatched to v17. - ilmari Attachments: [text/x-diff] 0001-Don-t-tab-complete-MATERIALIZED-VIEW-after-CREATE-UN.patch (1.5K, ../../[email protected]/2-0001-Don-t-tab-complete-MATERIALIZED-VIEW-after-CREATE-UN.patch) download | inline diff: From f8bc4d760aadd5f1f3d805f6de7c0d6d3eb8d078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <[email protected]> Date: Thu, 25 Jul 2024 14:33:14 +0100 Subject: [PATCH] Don't tab complete MATERIALIZED VIEW after CREATE UNLOGGED This was erroneously added in commit c951e9042dd1 because the grammar allows it, but it turns out transformCreateTableAsStmt() rejects it. --- src/bin/psql/tab-complete.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 891face1b6..024469474d 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3267,15 +3267,9 @@ psql_completion(const char *text, int start, int end) /* Complete "CREATE TEMP/TEMPORARY" with the possible temp objects */ else if (TailMatches("CREATE", "TEMP|TEMPORARY")) COMPLETE_WITH("SEQUENCE", "TABLE", "VIEW"); - /* Complete "CREATE UNLOGGED" with TABLE, SEQUENCE or MATVIEW */ + /* Complete "CREATE UNLOGGED" with TABLE or SEQUENCE */ else if (TailMatches("CREATE", "UNLOGGED")) - { - /* but not MATVIEW in CREATE SCHEMA */ - if (HeadMatches("CREATE", "SCHEMA")) - COMPLETE_WITH("TABLE", "SEQUENCE"); - else - COMPLETE_WITH("TABLE", "SEQUENCE", "MATERIALIZED VIEW"); - } + COMPLETE_WITH("TABLE", "SEQUENCE"); /* Complete PARTITION BY with RANGE ( or LIST ( or ... */ else if (TailMatches("PARTITION", "BY")) COMPLETE_WITH("RANGE (", "LIST (", "HASH ("); -- 2.39.2 ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-07-25 13:56 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-03 06:51 [PATCH 12/18] doc review: piecemeal construction of partitioned indexes Justin Pryzby <[email protected]> 2024-07-25 11:48 CREATE MATERIALIZED VIEW px shi <[email protected]> 2024-07-25 13:56 ` Re: CREATE MATERIALIZED VIEW Dagfinn Ilmari Mannsåker <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox