Remove PG version check from AsWithMaterialized
What does this MR do and why?
Prior to PostgreSQL 12, CTE statements had been materialized by default. The behavior changed in PostgreSQL 12 with the introduction of MATERIALIZED
keyword and CTE statements required the keyword to be executed separately. To keep the application code compatible with >= PostgreSQL 11, we've been using a custom Arel node AsWithMaterialized
that inserts MATERIALIZED
depending on the running PG version. Since GitLab 14.0 requires PostgreSQL 12.7, we can remove the version check from AsWithMaterialized
.
Resolves #325639 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by euko