Skip site navigation (1) Skip section navigation (2)

Re: [pgAdmin III] #332: SQL for TRIGGER with WHEN clause broken

From: "pgAdmin Trac" <trac(at)code(dot)pgadmin(dot)org>
To:
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: [pgAdmin III] #332: SQL for TRIGGER with WHEN clause broken
Date: 2011-08-20 01:20:26
Message-ID: 054.be47cfe7ab62db3d53fd767113cb1deb@code.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
#332: SQL for TRIGGER with WHEN clause broken
----------------------+-----------------------------------------------------
  Reporter:  brsa     |       Owner:  gleu           
      Type:  bug      |      Status:  closed         
  Priority:  minor    |   Milestone:  1.14           
 Component:  pgadmin  |     Version:  trunk          
Resolution:  fixed    |    Keywords:  browser trigger
  Platform:  all      |  
----------------------+-----------------------------------------------------

Comment(by brsa):

 First off, I don't actually understand most of the code, I am only poking
 at a spot I found. My "code" is from the top of my head.

 My patch apparently fixed the problem but left one set of enclosing
 brackets too many.
 Your additional patch cuts first and last character from the WHEN-
 Expression.

 In v1.14 RC1 I still see one set of brackets too many. So, somehow, this
 fails to work. Or maybe it does works but still leaves an extra set of
 brackets just like pg_get_triggerdef() does. (No idea why.)

 In any case, I propose this simpler fix instead:
 pgTrigger.cpp, line 393:

 -              wxT("  substring(pg_get_triggerdef(t.oid), 'WHEN (.*)
 EXECUTE PROCEDURE') AS whenclause\n")
 +              wxT("  substring(pg_get_triggerdef(t.oid), E'WHEN
 \\((.*)\\) EXECUTE PROCEDURE') AS whenclause\n")

-- 
Ticket URL: <http://code.pgadmin.org/trac/ticket/332#comment:4>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

In response to

pgadmin-hackers by date

Next:From: Erwin BrandstetterDate: 2011-08-20 01:22:16
Subject: www: dead link far 1.14 docs
Previous:From: Dave PageDate: 2011-08-19 19:01:01
Subject: Re: Refresh objects on Click

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group