Re: trigger AFTER INSERT - Mailing list pgsql-admin

From Josi Perez (3T Systems)
Subject Re: trigger AFTER INSERT
Date
Msg-id AANLkTimHqdW07smfqh4QG+6DEOBToqd_kFADPwNgq+0R@mail.gmail.com
Whole thread Raw
In response to Re: trigger AFTER INSERT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: trigger AFTER INSERT
List pgsql-admin
Thank you for your answer.
Without considering the errors, the transaction should not start after the AFTER INSERT?
Josi Perez


2010/8/12 Tom Lane <tgl@sss.pgh.pa.us>
"Josi Perez (3T Systems)" <josiperez3t@gmail.com> writes:
> If I write a trigger AFTER INSERT and I have one error in this trigger, the
> record (that I think was already inserted) is not inserted.

Sure, because the whole transaction is rolled back on error.

                       regards, tom lane

#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: TopMemoryContext - Configuration Mistake?
Next
From: "Kevin Grittner"
Date:
Subject: Re: trigger AFTER INSERT