This page in other versions: 9.0 / 9.1 / 9.2 / 9.3  |  Development versions: devel / 9.4  |  Unsupported versions: 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4

ALTER TRIGGER

Name

ALTER TRIGGER  --  change the definition of a trigger

Synopsis

ALTER TRIGGER trigger ON table
    RENAME TO newname
  

Inputs

trigger

The name of an existing trigger to alter.

table

The name of the table on which this trigger acts.

newname

New name for the existing trigger.

Outputs

ALTER TRIGGER

Message returned from trigger renaming.

ERROR

Message returned if trigger is not available, or new name is a duplicate of another existing trigger on the table.

Description

ALTER TRIGGER changes the definition of an existing trigger. The RENAME clause causes the name of a trigger on the given table to change without otherwise changing the trigger definition.

You must own the table on which the trigger acts in order to change its properties.

Notes

Refer to CREATE TRIGGER for a further description of valid arguments.

Usage

To rename an existing trigger:

ALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;
   

Compatibility

SQL92

The clause to rename triggers is a PostgreSQL extension from SQL92.

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