Commit 87f9a074 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'mk/fix-geo-fdw-with-pg-11' into 'master'

Fix FDW for PostgreSQL 11

Closes #9664

See merge request gitlab-org/gitlab-ee!9777
parents c4c7038e b1bc6648
......@@ -37,10 +37,9 @@ module Gitlab
Gitlab::Geo.cache_value(:geo_fdw_count_tables) do
sql = <<~SQL
SELECT COUNT(*)
FROM information_schema.tables
WHERE table_schema = '#{FOREIGN_SCHEMA}'
AND table_type = 'FOREIGN TABLE'
AND table_name NOT LIKE 'pg_%'
FROM information_schema.foreign_tables
WHERE foreign_table_schema = '#{FOREIGN_SCHEMA}'
AND foreign_table_name NOT LIKE 'pg_%'
SQL
::Geo::TrackingBase.connection.execute(sql).first.fetch('count').to_i
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment