A column with a trigger is not updated when a data change is made through the Data Output section
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Reproduce the issue in pgAdmin's Data Output section using the supplied PostgreSQL table, trigger, and INSERT/UPDATE steps. Start with the Save Data Changes flow and compare the edited row with the database result after the trigger runs. Done means the Data Output section refreshes the trigger-updated date column immediately after saving, without requiring a separate SELECT.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi !
1. What
I think that a column with a trigger is not updated in the Data Output section after a Data Change has been made on another column.
Here are my pgAdmin infos :
- Version : 9.11
- Application Mode : Desktop
- Commit : dc801e362ebde7fe59ecf77eaaab740fe7452cc5 2025-12-08
- Python Version : 3.14.1
- Browser : Chrome 143.0.0.0
- Operating System : Alpine Linux v3.23, Linux-6.12.10-76061203-generic-x86_64-with-musl1
2. How
- Create a new table with a few columns, including one date column
CREATE TABLE mytable (
id SERIAL PRIMARY KEY,
value TEXT,
date TIMESTAMP WITH TIME ZONE
);
- Add a trigger to this table :
CREATE OR REPLACE FUNCTION public.myfunction()
RETURNS TRIGGER AS $$
BEGIN
NEW.date = NOW();
RETURN NEW;
END;
$$ language 'plpgsql';
CREATE OR REPLACE TRIGGER mytrigger
BEFORE INSERT OR UPDATE ON mytable
FOR EACH ROW EXECUTE FUNCTION myfunction();
- Do an
INSERTquery :
INSERT INTO mytable VALUES (DEFAULT, 'Something', current_timestamp);
- Do a
SELECTquery :
SELECT * FROM mytable;
🟢 Seen & expected behavior :
- the inserted row can be seen in the "Data Output" section
- the
datecolumn has been correctly filled (by the trigger) and is correctly displayed
-
Change the value of one of the columns (but not the
dateone) through the "Data Output" section -
Press the "Save Data Changes" button
🔴 Seen behavior : only the edited column is up to date in the "Data Output" section
Expected behavior : the date column should be up to date as well
- Do a
SELECTquery
SELECT * FROM mytable;
🟢 Seen & expected behavior :
- the edited row can be seen in the "Data Output" section
- the
datecolumn is now correctly displayed (with its updated value)
3. Why
It seems that, after a successful "Data Change", pgAdmin doesn't get the last known value of the row (or of the other attributes of the row). It only updates the modified cell(s).
- Ngôn ngữ chính
- Python
- Star
- 3.9k
- Fork
- 922
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 33
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pgadmin-org/pgadmin4
-
Invalid syntax in sshtunnelCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pgadmin-org/pgadmin4#10797 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pgadmin-org/pgadmin4#10426 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
pgadmin-org/pgadmin4#10796 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Schema Diff does not detect foreign keys that reference a different schemaCó thể đã có người làm @dpage đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
pgadmin-org/pgadmin4#10786 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
pgadmin-org/pgadmin4#10783 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của pgadmin-org/pgadmin4
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mohanraj00/entelos#200 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dead url in mise.tomlĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
sweep
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
bketelsen/truenas-mcp#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
sandbox-quantum/switch#2163 ·
Maintainer thường phản hồi trong vòng 1 ngày