A column with a trigger is not updated when a data change is made through the Data Output section
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- Python
- Sterne
- 3.9k
- Forks
- 922
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 33
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus pgadmin-org/pgadmin4
-
Invalid syntax in sshtunnelEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
pgadmin-org/pgadmin4#10797 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
pgadmin-org/pgadmin4#10426 · 3 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
pgadmin-org/pgadmin4#10796 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schema Diff does not detect foreign keys that reference a different schemaEvtl. vergeben @dpage hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 57/100
pgadmin-org/pgadmin4#10786 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
pgadmin-org/pgadmin4#10783 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in pgadmin-org/pgadmin4
Ähnliche Issues
-
Internal ErrorOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
frappe/frappe_docker#2071 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug python
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
traceloop/openllmetry#4717 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
The-Pocket/PocketFlow#161 ·
-
[Bug]: Webapp workspace fails to render in Safari — "Can't find variable: requestIdleCallback"Offencomp/desktop P2 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NousResearch/hermes-agent#157702 ·
Maintainer antworten meist innerhalb von 1 Tag
-
scibench_physics / scibench_chemistry: a correct answer scores 0 when the unit has a power of tenEvtl. vergeben @BahaaMattar hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
EvolvingLMMs-Lab/lmms-eval#1699 ·
Maintainer antworten meist innerhalb von 1 Tag