Re: Bug: Constraint Trigger - created with pgadmin - is not visible and missing in SQL Pane / Create Script

From: Michael Brux <michael(dot)brux(at)m-brux(dot)de>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Bug: Constraint Trigger - created with pgadmin - is not visible and missing in SQL Pane / Create Script
Date: 2012-04-30 14:47:33
Message-ID: F010B03DC915FC4CA11FD3390EFEE878EBB4E3@DBXPRD0310MB394.eurprd03.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Did some research on system catalogs and how to retrieve constraint triggers:

Internal triggers (addressed in "CREATE CONSTRAINT TRIGGER in SQL pane (pgAdmin 1.14.1)" from Thu, 15 Dec 2011 15:39:37 +0200 ) have tgisinternal set to true in table pg_trigger.

Constraint triggers (I was talking about) have tgisinternal set to false in table pg_trigger.

Maybe this helps.

Regards, Michael

Von: pgadmin-support-owner(at)postgresql(dot)org [mailto:pgadmin-support-owner(at)postgresql(dot)org] Im Auftrag von Michael Brux
Gesendet: Montag, 30. April 2012 15:03
An: pgadmin-support(at)postgresql(dot)org
Betreff: [pgadmin-support] Bug: Constraint Trigger - created with pgadmin - is not visible and missing in SQL Pane / Create Script

I created a new constraint trigger via pgadmin user interface:

Right click on table -> New Object -> New Trigger
Checked "Constraint Trigger" (on Definition Tab)

This Trigger is not visible in pgadmin.

On SQL pane and Create Script this trigger is missing.

Trigger works / Trigger Function is fired.

When I check this with phppgadmin I can see the trigger. Export in phppgadmin includes the trigger.

SQL Statement for the trigger (from phppgadmin Export) is

--

-- Name: ... ; Type: TRIGGER; Schema: ... ; Owner: ...

--
CREATE CONSTRAINT TRIGGER <trigger-name> AFTER INSERT ON <table-name> NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE <trigger-function>;

From my understanding this trigger should be listed in Table Constraints and should be included in Create Script.

PostgreSQL 9.1.3 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1, 64-bit (installed via Ubuntu package 9.1.3-0ubuntu0.11.10)
pgAdmin 1.14.2 (Feb 24 2012, rev: REL-1_14_2)

Regards, Michael

Browse pgadmin-support by date

  From Date Subject
Next Message Tim Uckun 2012-04-30 22:59:50 PGadmin has a very hard time dealing with momentary network interruptions.
Previous Message Guillaume Lelarge 2012-04-30 14:37:34 Re: Bug: Constraint Trigger - created with pgadmin - is not visible and missing in SQL Pane / Create Script