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

Rename Trigger script error

From: Bartosz Dmytrak <bdmytrak(at)eranet(dot)pl>
To: PgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Rename Trigger script error
Date: 2012-03-09 10:49:03
Message-ID: CAD8_Ucbwo9XDr0GBMb3pBUGRW0FtFAweu=DCMqVOk7P_nfe49w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-support
Hi,
I think there is another bug in trigger script.

Use case is: rename trigger using GUI, Trigger has to be based on camel
case function name

Generated Code is:
ALTER TRIGGER "TriggerOldName" ON "MySchema"."MyTable" RENAME TO
"TriggerNewName";

/*BD: this part is not necessary but is created by pgAdmin*/
CREATE TRIGGER "TriggerNewName" AFTER INSERT OR UPDATE OF "Col1", "Col2",
"Col3" OR DELETE
   ON "MySchema"."MyTable" FOR EACH ROW
   EXECUTE PROCEDURE doSomething(); --missing schema name and quotation

but should be only:
ALTER TRIGGER "TriggerOldName" ON "MySchema"."MyTable" RENAME TO
"TriggerNewName";

I think RENAME line is enough, rest of script generates errors like:
Function dosomenthing() does not exists or Trigger "TriggerNewName" already
exists (after You correct function name manually) - what is expected
behaviour.

pgAdmin 1.14.2 Win 7 32 bit

Regards,
Bartek

Responses

pgadmin-support by date

Next:From: Colin BeckinghamDate: 2012-03-09 13:11:23
Subject: Error on delete row
Previous:From: Colin BeckinghamDate: 2012-03-09 10:09:39
Subject: Error in Query Builder: multi-line sql

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