PG Bug reporting form <noreply@postgresql.org> writes:
> CREATE OR REPLACE VIEW v3.temp_view AS
> SELECT * FROM users WHERE id = 'e-1'
> UNION ALL
> SELECT * FROM users WHERE id = 'e-2';
> Either way when the view is created, the indexes and the related relations
> of the foreign key references are being dropped.
Views do not have either indexes or foreign keys.
> What + Why? I am processing the result of the union in another CTE which now
> is not having access to indices and so it is performing a seq scan!
This seems to be a performance complaint, rather than a valid bug
report. You might find it helpful to read
https://wiki.postgresql.org/wiki/Slow_Query_Questions
regards, tom lane