| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Jitendra Loyal <jitendra(dot)loyal(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Statement-level trigger results in recursion |
| Date: | 2019-02-18 21:49:28 |
| Message-ID: | 22272c24-16ec-c7c4-e060-20f198792d26@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 2/18/19 9:07 AM, Jitendra Loyal wrote:
> I do understand that the statement level trigger will be executed once
> before the operation. My point is.. if one does not know the rows, what
> kind of use it can be put to. What is the use case? Like in after
> triggers, one gets the rows in transition tables, how does one do with
> vefore trigger.
Use FOR EACH ROW.
Why you cannot use a FOR EACH STATEMENT trigger is something I thought I
remember being discussed on the list before. Unfortunately I cannot find
that conversation at the moment. Someone else will need to weigh in on this.
>
> Thanks and regards,
> Jiten
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2019-02-18 21:55:09 | Re: BEFORE ... Statement-level trigger |
| Previous Message | Martín Fernández | 2019-02-18 20:41:05 | Re: PG Upgrade with hardlinks, when to start/stop master and replicas |