From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com> |
Cc: | PostgreSQL Mailing Lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Trigger function is not working as expected after migration from v9.6 to v11.7 |
Date: | 2020-09-30 01:05:48 |
Message-ID: | CAApHDvqKbPam9f5c+sAXMwnvaazA=LUk+sazmhNAccipxiAq1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, 30 Sep 2020 at 13:45, Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com> wrote:
> I have implemented table partition with an inheritance approach and the trigger function is not working as expected after migration from v9.6 to v11.7
>
> The issue is, I have a table and created inheritance tables for each month; it has a date column load_date as it takes current_timestamp and respective this created trigger function with BEFORE INSERT OR UPDATE.
>
> Everything good so far, but earlier I have inheritance tables till August 2020, so I created inheritance tables till December 2020, and somehow I missed for the month September 2020 in the table creation. Still, I updated the trigger function without missing September 2020.
>
>
> So, when injection started for September 2020 into a master table, the trigger didn't occur through any error because it's satisfied the conditions of the trigger function and after passing through the trigger function, it should look for a table September 2020, because the condition is base on load_date (current_timestamp ) if not it should insert into a master table or through any error,
>
> The server acted strangely, records inserted to the master table, but load_date didn't take current_timestamp; it recorded future timestamp, i.e., January 2021.
This seems to be a duplicate of
https://www.postgresql.org/message-id/280232870.3108583.1600280574763@mail.yahoo.com
Please don't start a new thread for the same issue. I've responded on
your original thread.
David
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2020-09-30 01:50:00 | BUG #16645: pg_upgrade does not mark template1 as a system database |
Previous Message | David Rowley | 2020-09-30 01:02:52 | Re: table partition with inheritance having current_timestamp issue if we miss range table |