Re: trigger impacting insertion of records

2021-05-10 Thread Michael Lewis
It seems like there is some flaw here. From my reading, on insert of any row, you are updating ALL rows in the same table to just remove an underscore if it matches the pattern of 'US_' at the beginning. That doesn't seem likely to be what you want. I'd think you would want something like the below

Re: trigger impacting insertion of records

2021-05-07 Thread Adrian Klaver
On 5/6/21 11:37 PM, Atul Kumar wrote: hi, The data is inserting using some json sript which is working fine in our stating server and inserting complete records. But in production data insertion is slow and after some insertion it just abort somehow. DB logs are given below: #PostGreSQL: idl

Re: trigger impacting insertion of records

2021-05-06 Thread Atul Kumar
hi, The data is inserting using some json sript which is working fine in our stating server and inserting complete records. But in production data insertion is slow and after some insertion it just abort somehow. DB logs are given below: #PostGreSQL: idle^^2021-05-06 18:06:09 PDT^^bonzipay^^us

Re: trigger impacting insertion of records

2021-05-06 Thread Adrian Klaver
On 5/6/21 12:45 AM, Atul Kumar wrote: Hi, I have simple table having structure like given below: \d bp_ach_trans Table "bonzipay.bp_ach_trans" Column | Type | Modifiers ++

Re: trigger impacting insertion of records

2021-05-06 Thread Vijaykumar Jain
just simplified, but it works fine for me. create table example(id int primary key, value text); create or replace function trg_fn() returns trigger language plpgsql as $$ begin RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL;

trigger impacting insertion of records

2021-05-06 Thread Atul Kumar
Hi, I have simple table having structure like given below: \d bp_ach_trans Table "bonzipay.bp_ach_trans" Column | Type | Modifiers ++---