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

Re: Trigger for Truncate event

From: Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Trigger for Truncate event
Date: 2009-08-27 18:04:02
Message-ID: c11950270908271104k3ec8e180w3e6144b25dbd7651@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hmm..you are correct.

Thanks.

On Thu, Aug 27, 2009 at 11:20 PM, Thomas Kellerer <spam_eater(at)gmx(dot)net>wrote:

> Jignesh Shah wrote on 27.08.2009 19:37:
>
>> Thanks Andreas, when I tried to create trigger it gives me error. Could
>> you tell me what is wrong?
>>  mydb=# CREATE TRIGGER truncate_trigger
>> mydb-# AFTER TRUNCATE ON mytable
>> mydb-# FOR EACH STATEMENT EXECUTE PROCEDURE my_test();
>> ERROR:  syntax error at or near "TRUNCATE" at character 52
>> LINE 2: AFTER TRUNCATE ON mytable
>>
>
> You are probably using a version prior to 8.4
>
> You need 8.4 to create triggers for TRUNCATE
>
> Thomas
>
>
> --
>  Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

pgsql-novice by date

Next:From: Steve TDate: 2009-08-27 18:11:49
Subject: Re: Speeding up 'bulk' delete (and/or seeing what isgoing on while the delete is being processed)
Previous:From: Thomas KellererDate: 2009-08-27 17:50:53
Subject: Re: Trigger for Truncate event

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