Skip to content
Snippets Groups Projects

Support AS MATERIALIZED in PG12 [RUN AS-IF-FOSS]

Merged Adam Hegyi requested to merge 245323-arel-support-for-materialized-cte into master
32 files
+ 199
62
Compare changes
  • Side-by-side
  • Inline
Files
32
@@ -62,7 +62,7 @@ def update_positions(pairs_with_position, query_name)
def run_update_query(values, query_name)
Issue.connection.exec_query(<<~SQL, query_name)
WITH cte(cte_id, new_pos) AS (
WITH cte(cte_id, new_pos) AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (
SELECT *
FROM (VALUES #{values}) as t (id, pos)
)
Loading