Re: Partitioned tables and [un]loggedness

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Shinya Kato <shinya11.kato@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, "David G. Johnston" <david.g.johnston@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-04T16:15:29Z
Lists: pgsql-hackers
On Wed, Jun 04, 2025 at 07:05:20PM +0900, Shinya Kato wrote:
> On Wed, Jun 4, 2025 at 6:55 PM Shinya Kato <shinya11.kato@gmail.com> wrote:
>> Should we consider preventing tab completion for PARTITION BY
>> immediately after CREATE TABLE name (...)? Or is it fine to leave it
>> as is, given that it's syntactically correct?
> 
> Sorry.
> CREATE TABLE name (...) -> CREATE UNLOGGED TABLE name (...)

I see no benefit in recommending things that are guaranteed to error.  In
commit 5c1ce1b, we removed tab completion for CREATE UNLOGGED MATERIALIZED
VIEW even though it is supported by the grammar.  The partitioned table
case sounds like roughly the same situation.

-- 
nathan



Commits

  1. psql: Remove PARTITION BY clause in tab completion for unlogged tables

  2. Remove support for unlogged on partitioned tables

  3. Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH

  4. Introduce ATT_PARTITIONED_TABLE in tablecmds.c

  5. Refactor some code for ALTER TABLE SET LOGGED/UNLOGGED in tablecmds.c

  6. Remove tab completion for CREATE UNLOGGED MATERIALIZED VIEW.