Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8rzO-00032D-LX for pgsql-admin@arkaria.postgresql.org; Wed, 18 Apr 2018 18:39:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f8rzN-0007y7-BP for pgsql-admin@arkaria.postgresql.org; Wed, 18 Apr 2018 18:39:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8rzN-0007xv-0W for pgsql-admin@lists.postgresql.org; Wed, 18 Apr 2018 18:39:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8rzK-00022E-Nz for pgsql-admin@postgresql.org; Wed, 18 Apr 2018 18:39:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w3IIdPM4008705; Wed, 18 Apr 2018 14:39:25 -0400 From: Tom Lane To: Wells Oliver cc: pgsql-admin@postgresql.org Subject: Re: Dropping constraints on a table locks referenced table... why? In-reply-to: References: <2444.1523991472@sss.pgh.pa.us> Comments: In-reply-to Wells Oliver message dated "Wed, 18 Apr 2018 11:14:41 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8703.1524076765.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Apr 2018 14:39:25 -0400 Message-ID: <8704.1524076765@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Wells Oliver writes: > Where can I see these triggers? They don't show under the PG Admin trigg= er > tab of course, are they, I don't know, special triggers, stored elsewher= e? > Can I query an internal PG table? Sure, like this: regression=3D# create table pk (f1 int primary key); CREATE TABLE regression=3D# create table fk (f1 int references pk); CREATE TABLE regression=3D# select tgname,tgfoid::regproc from pg_trigger where tgrelid= =3D 'pk'::regclass; tgname | tgfoid = ------------------------------+------------------------ RI_ConstraintTrigger_a_51649 | "RI_FKey_noaction_del" RI_ConstraintTrigger_a_51650 | "RI_FKey_noaction_upd" (2 rows) regression=3D# select tgname,tgfoid::regproc from pg_trigger where tgrelid= =3D 'fk'::regclass; tgname | tgfoid = ------------------------------+--------------------- RI_ConstraintTrigger_c_51651 | "RI_FKey_check_ins" RI_ConstraintTrigger_c_51652 | "RI_FKey_check_upd" (2 rows) psql and probably most other client tools hide these triggers figuring they're uninteresting, but they're pretty ordinary triggers otherwise. regards, tom lane