Re: Data Issue

From: Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com>
To: Somnath Som <somnath(dot)som(at)ericsson(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Data Issue
Date: 2024-07-21 17:11:00
Message-ID: CAAPsdhcAYcUJYAp2c=mY4-rJtdmY-uBur5jG=ybbu6HcxQT3iw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

It's a foreign key error.
In Your case the Region Table is the Source Table from where the Site Table
is linked with Foreign Key
And you are inserting data in the Site table where the Foreign Key Column (
region) has no data in the Parent Table Region.

Regards
Kashif Zeeshan

On Sun, Jul 21, 2024 at 9:47 PM Somnath Som <somnath(dot)som(at)ericsson(dot)com>
wrote:

> When trying to insert data in a table then getting below error, someone
> can guide me please how to resolve the issue.
>
>
>
> Error: insert or update on table "site" violates foreign key constraint
> "reg_fkey"
> DETAIL: Key (region)=() is not present in table "region".
> Traceback (most recent call last):
>
>
>
>
>

In response to

  • Data Issue at 2024-07-21 16:47:06 from Somnath Som

Browse pgsql-admin by date

  From Date Subject
Next Message Holger Jakobs 2024-07-21 17:14:12 Re: Data Issue
Previous Message Somnath Som 2024-07-21 16:47:06 Data Issue