Re: BUG #18607: UNION ALL discards all foreign key relations + indexes

hubert depesz lubaczewski <depesz@depesz.com>

From: hubert depesz lubaczewski <depesz@depesz.com>
To: Sanskar Agrawal <sanskar@flintk12.com>
Cc: pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Date: 2024-09-10T07:13:00Z
Lists: pgsql-bugs
On Tue, Sep 10, 2024 at 12:41:14PM +0530, Sanskar Agrawal wrote:
> Yes consider a small table as users with users.id as primary key,
> 
> took two rows from the same and ran a union all it tends to drop the
> indexes + foreign relations

Please show full example that I can run on empty DB.

Set of create table statement(s), adding indexes, foreign keys, and then
create view, that results in dropped indexes/foreign keys.

Best regards,

depesz