From 8e16dfd0fd3755ad6c901dba4ce02a7ec2c76922 Mon Sep 17 00:00:00 2001
From: Stan Hu <stanhu@gmail.com>
Date: Mon, 28 Dec 2020 15:11:12 -0800
Subject: [PATCH] Use upstream version of pg_query again

The upstream gem has incorporated all the necessary changes--namely ARM
support and SHA256 verification of libpg_query--so we can now switch
back to the official gem.

CHANGELOG: https://github.com/lfittl/pg_query/blob/master/CHANGELOG.md

Diff: https://github.com/lfittl/pg_query/compare/v1.2.0..v1.3.0
---
 Gemfile      | 2 +-
 Gemfile.lock | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Gemfile b/Gemfile
index 18a4d7941d090..12d6bbc8498e6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -306,7 +306,7 @@ gem 'rack-attack', '~> 6.3.0'
 gem 'sentry-raven', '~> 3.0'
 
 # PostgreSQL query parsing
-gem 'gitlab-pg_query', '~> 1.3.1', require: 'pg_query'
+gem 'pg_query', '~> 1.3.0'
 
 gem 'premailer-rails', '~> 1.10.3'
 
diff --git a/Gemfile.lock b/Gemfile.lock
index de2b389839ff8..1a9d4316eec74 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -847,6 +847,7 @@ GEM
     peek (1.1.0)
       railties (>= 4.0.0)
     pg (1.2.3)
+    pg_query (1.3.0)
     png_quantizator (0.2.1)
     po_to_json (1.0.1)
       json (>= 1.6.0)
@@ -1361,7 +1362,6 @@ DEPENDENCIES
   gitlab-mail_room (~> 0.0.8)
   gitlab-markup (~> 1.7.1)
   gitlab-net-dns (~> 0.9.1)
-  gitlab-pg_query (~> 1.3.1)
   gitlab-puma (~> 4.3.3.gitlab.2)
   gitlab-puma_worker_killer (~> 0.1.1.gitlab.1)
   gitlab-sidekiq-fetcher (= 0.5.2)
@@ -1451,6 +1451,7 @@ DEPENDENCIES
   parallel (~> 1.19)
   peek (~> 1.1)
   pg (~> 1.1)
+  pg_query (~> 1.3.0)
   png_quantizator (~> 0.2.1)
   premailer-rails (~> 1.10.3)
   prometheus-client-mmap (~> 0.12.0)
-- 
GitLab