On Fri, Oct 25, 2013 at 3:37 PM, fabriziomello <fabriziome...@gmail.com>
> On 2013-09-18 15:15:55 +0200, Bernd Helmle wrote:
> > On 2013-09-18 15:15:55 +0200, Bernd Helmle wrote:
> > > --On 18. September 2013 13:52:29 +0200 Andres Freund
> > > <andres@> wrote:
> > >
> > > >If you do ALTER TABLE ... DISABLE TRIGGER ALL; and then individually
> > > >re-enable the disabled triggers it's easy to miss internal triggers.
> > > >A \d+ tablename will not show anything out of the ordinary for that
> > > >situation since we don't show internal triggers. But foreign key
> > > >won't work.
> > > >So, how about displaying disabled internal triggers in psql?
> > >
> > > Hi had exactly the same concerns this morning while starting to look
> > the
> > > ENABLE/DISABLE constraint patch. However, i wouldn't display them as
> > > triggers, but maybe more generally as "disabled constraints" or such.
> > Well, that will lead the user in the wrong direction, won't it? They
> > haven't disabled the constraint but the trigger. Especially as we
> > already have NOT VALID and might grow DISABLED for constraint
> > themselves...
> The attached patch  enable PSQL to list internal disabled triggers in
> only in versions >= 9.0.
>  psql-display-all-triggers-v1.patch
I'm just send a new WIP patch rebased from master.
Fabrízio de Royes Mello
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 96322ca..f457e21 100644
@@ -2079,7 +2079,7 @@ describeOneTableDetails(const char *schemaname,
(pset.sversion >= 90000 ? ", true" : ""),
if (pset.sversion >= 90000)
- appendPQExpBufferStr(&buf, "NOT t.tgisinternal");
+ appendPQExpBuffer(&buf, "(NOT t.tgisinternal OR (t.tgisinternal AND t.tgenabled = 'D'))");
else if (pset.sversion >= 80300)
appendPQExpBufferStr(&buf, "t.tgconstraint = 0");
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: