Re: Rename Trigger script error - Mailing list pgadmin-support

From Guillaume Lelarge
Subject Re: Rename Trigger script error
Date
Msg-id 1331367066.2339.0.camel@localhost.localdomain
Whole thread Raw
In response to Rename Trigger script error  (Bartosz Dmytrak <bdmytrak@eranet.pl>)
List pgadmin-support
On Fri, 2012-03-09 at 11:49 +0100, Bartosz Dmytrak wrote:
> 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.
> 

Fixed now. Thanks for your report.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



pgadmin-support by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: BUG
Next
From: Guillaume Lelarge
Date:
Subject: Re: Error on delete row