agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Rui DeSousa <rui.desousa@icloud.com>
To: M Sarwar <sarwarmd02@outlook.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: wolters.k@web.de <wolters.k@web.de>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: AFTER INSERT trigger INSERT into another table-B are ignoring Table-B constraints
Date: Thu, 23 May 2024 18:15:59 -0400
Message-ID: <93EDD0BC-830E-4EE6-95FD-D41F689DD7EF@icloud.com> (raw)
In-Reply-To: <PH7PR19MB5968B9CB8A396A00786566CDD3F42@PH7PR19MB5968.namprd19.prod.outlook.com>
References: <trinity-df545866-e250-4a4d-a113-c9f6e3cd3fca-1716417521384@msvc-mesg-web003>
<DM4PR19MB5978AAB4E24FC60F126BC1BBD3F42@DM4PR19MB5978.namprd19.prod.outlook.com>
<CAKFQuwZNtH=2WkT4_MgZ9GFe=3QYL54J_n76rPoNt3fgOMao_A@mail.gmail.com>
<DM4PR19MB59782A6C8D95146C6A608B15D3F42@DM4PR19MB5978.namprd19.prod.outlook.com>
<1E8736C1-ACF4-4250-9B0B-789A6D927958@icloud.com>
<PH7PR19MB5968B9CB8A396A00786566CDD3F42@PH7PR19MB5968.namprd19.prod.outlook.com>
> On May 23, 2024, at 4:30 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
> Constraints are working as expected when I am working the table-2 directly.
> In my case, Table-2 needs to get INSERTed only when table-1 has INSERTs. Table-1 is working fine. Table-2 is also working fine when I am directly working in table-2.
> But when I Table-2 needs to have INSERTs based on the trigger invocation of Table-1, Table-2 is applying constraints which is causing issues.
CONSTRAINT cons_unique_for_concatenated_view UNIQUE (start_time_numeric, stop_time_numeric, test_action, part_type, fixture_id, run_id, auxid1_build_id, auxid2_asic_id, serial_number, part_pf)
So the constraint above is not being honored? What are the duplicate records? Is this a view that you’re seeing the duplicate records in or a table?
I was under the impression that NULLs where in play here. Is that not the case?=
view thread (8+ messages)
Message-ID: <93EDD0BC-830E-4EE6-95FD-D41F689DD7EF@icloud.com>
Permalink: ../93EDD0BC-830E-4EE6-95FD-D41F689DD7EF@icloud.com/
Also on: postgresql.org/message-id/93EDD0BC-830E-4EE6-95FD-D41F689DD7EF@icloud.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rui.desousa@icloud.com, sarwarmd02@outlook.com, david.g.johnston@gmail.com, wolters.k@web.de, pgsql-admin@lists.postgresql.org
Subject: Re: AFTER INSERT trigger INSERT into another table-B are ignoring Table-B constraints
In-Reply-To: <93EDD0BC-830E-4EE6-95FD-D41F689DD7EF@icloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox