Re: Need to check each element of an array satisfies a foreign key constraint - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Need to check each element of an array satisfies a foreign key constraint
Date
Msg-id ffbc800d1881a1561b03e8469337ef1242e5aca4.camel@cybertec.at
Whole thread Raw
In response to Need to check each element of an array satisfies a foreign key constraint  (David Gauthier <davegauthierpg@gmail.com>)
List pgsql-general
On Tue, 2021-07-13 at 10:00 -0400, David Gauthier wrote:
> I have a column in a table which is a csv of values and I need to make sure each element of the csv = the PK of that
sametable.
 

This won't work, and it is broken by design.

Change your data model to adhere to the first normal form, and the
exercise will be simple.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: PostgreSQL 9.2 high replication lag
Next
From: Luca Ferrari
Date:
Subject: statistic target and sample rate