BUG #19559: ALTER TABLE SET EXPRESSION / ALTER TYPE fails on columns referenced by a property graph - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #19559: ALTER TABLE SET EXPRESSION / ALTER TYPE fails on columns referenced by a property graph
Date
Msg-id 19559-6e5d454d86f920e7@postgresql.org
Whole thread
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      19559
Logged by:          Fredrik Svensson
Email address:      svenna01@gmail.com
PostgreSQL version: 19beta2
Operating system:   Linux (Debian trixie, official postgres:19beta2
Description:

On 19beta2:

      CREATE TABLE t (id int PRIMARY KEY, a int, b int,
        s int GENERATED ALWAYS AS (a + b) STORED);
      ALTER TABLE t ALTER COLUMN s SET EXPRESSION AS (a - b);   -- ok
      CREATE PROPERTY GRAPH g
        VERTEX TABLES (t KEY (id) LABEL v PROPERTIES (id, s));
      ALTER TABLE t ALTER COLUMN s SET EXPRESSION AS (a * b);
      ERROR:  unexpected object depending on column: property s of label v
of vertex t of property graph g

Cause:
CREATE PROPERTY GRAPH records per-column dependencies (element keys via
array_of_attnums_to_objectaddrs, property expressions via
recordDependencyOnSingleRelExpr), but RememberAllDependentForRebuilding() in
tablecmds.c has no cases for PropgraphElementRelationId /
PropgraphLabelPropertyRelationId, so they reach the default: elog.
Still present in master as of dde9a87d4d0.

Expected, following the existing pattern in that switch:
  - AT_AlterColumnType: user-facing ERRCODE_FEATURE_NOT_SUPPORTED error.
  - AT_SetExpression: no error — column attnum and type are unchanged, so
there is nothing to rebuild.





pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19558: User-defined prefix operators "|" and "->" no longer parse in 19beta2 (SQL/PGQ grammar change)
Next
From: Tom Lane
Date:
Subject: Re: BUG #19553: Wrong results from nested LEFT JOINs over an empty subquery (regression since v16)