Re: CREATE MATERIALIZED VIEW
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: px shi <spxlyy123@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2024-07-25T14:09:09Z
Lists: pgsql-hackers
Attachments
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> writes: > px shi <spxlyy123@gmail.com> 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. Scratch that, I misread the diff. The tab completion has been there since matviews were added in commit 3bf3ab8c5636, but the restriction on unlogged matviews was added later in commit 3223b25ff73, which failed to update the tab completion code to match. Here's a updated patch with a corrected commit message. - ilmari
Commits
-
Remove tab completion for CREATE UNLOGGED MATERIALIZED VIEW.
- 5c1ce1bbbe5f 18.0 landed
-
Add tab completion for CREATE SCHEMA in psql
- c951e9042dd1 17.0 cited
-
Disallow unlogged materialized views.
- 3223b25ff737 9.3.0 cited
-
Add a materialized view relations.
- 3bf3ab8c5636 9.3.0 cited