Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Inherited columns are not removed from a table's Columns tab after removing the parent table from "Inherited from"

オープン 初心者向け
#10,470 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@G-Glitch404 がすでに取り組んでいます。

2026年10月4日 から。

  • #10504 @G-Glitch404 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, postgresql, python

調査の方向性

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.ui.js の coll_inherits deferredDepChange の削除ロジックから始め、web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/utils.py の get_formatted_columns と比較してください。get_columns_for_table.sql とプロパティ取得の経路を確認し、再度開いた後も inheritedid が保持されることを確認してください。完了とは、保存された親を削除するとその継承されたカラムが削除され、子自身のカラムには影響せず、関連するテストが成功することです。

索引モデルが issue の本文から書いたものです。

説明

Bug

Describe the bug

When a parent table is added under "Inherited from" on a table's Columns tab, its columns are correctly pulled into the child's column list as read-only inherited columns. However, once the table has been saved and the Properties dialog reopened, removing that parent from "Inherited from" does not remove its columns from the Columns tab — they remain in the grid and are subsequently treated/saved as the child's own columns.

This is a separate, still-open issue from #10179 / #10332 — that fix addressed marking inherited columns read-only, not this removal path.

To Reproduce

  1. Open the Properties dialog of a table (or create a new one).
  2. On the Columns tab, add a parent table under "Inherited from".
  3. The parent's columns show up in the child's column list as inherited (read-only) columns.
  4. Save.
  5. Reopen the table's Properties dialog.
  6. Remove the parent table from "Inherited from".
  7. The previously-inherited columns stay in the Columns tab instead of being removed, and the list is what gets persisted on the next Save.

(Note: if the parent is added and removed within the same, unsaved dialog session, the columns are correctly removed — the bug only appears after a save + reopen cycle.)

Expected behavior

Removing a table from "Inherited from" should remove that parent's contributed columns from the child's Columns tab, leaving only the columns the child still legitimately owns — mirroring ALTER TABLE child NO INHERIT parent in PostgreSQL, and matching the "add" side of the same control.

Error message

N/A — no error is raised; this is a silent data/UI bug.

Screenshots

(attach if available)

Desktop (please complete the following information):

  • OS: (fill in)
  • pgAdmin version: 9.18-dev / master (f09776c22 or later, includes #10332) — (adjust to your actual build)
  • Mode: (Desktop or Server)
  • Browser (if running in server mode): (fill in)
  • Package type: (fill in)

Additional context

Root cause: table.ui.js's coll_inherits field's deferredDepChange "Remove columns logic" (around table.ui.js:685-706) removes stale columns by matching col.inheritedid == removeOid. That field is only present on columns fetched interactively via the get_columns endpoint (get_columns_for_table.sql, which returns both inheritedfrom and inheritedid).

Once the table is saved and reopened, its columns instead come from the properties fetch. get_formatted_columns (columns/utils.py, around L327-332) queries the same SQL for the parent's columns but only copies other_col['inheritedfrom'] into col['inheritedfromtable'] — it drops other_col['inheritedid'], even though it's available in the same row. So reopened columns carry no inheritedid, and the frontend's removal filter above can never match them — the parent's columns are stranded in the grid indefinitely.

Suggested fix: also stamp col['inheritedid'] = other_col['inheritedid'] in get_formatted_columns, so the existing frontend removal match works the same way whether a column was added interactively or loaded from a saved table's properties.

Verified against pgadmin-org/pgadmin4 master, commit f09776c22 (2026-09-15), which already includes the merged #10332 fix (153e3273d).

主要言語
Python
スター
3.9k
フォーク
904
平均マージ
1日 3時間
マージ済み PR(30日)
30

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pgadmin-org/pgadmin4 のほかの issue

pgadmin-org/pgadmin4 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。