Blame SOURCES/DBD-Pg-3.7.4-Remove-usage-of-deprecated-pg_constraint.consrc-colu.patch

810534
From 35080ce5535e233428a7e17320e111962daec7e1 Mon Sep 17 00:00:00 2001
810534
From: Dagfinn Ilmari Mannsaker <ilmari@sid.internal>
810534
Date: Tue, 9 Apr 2019 17:40:55 +0100
810534
Subject: [PATCH] Remove usage of deprecated pg_constraint.consrc column
810534
MIME-Version: 1.0
810534
Content-Type: text/plain; charset=UTF-8
810534
Content-Transfer-Encoding: 8bit
810534
810534
It doesn't track outside change that might affect the representation,
810534
and will be removed in PostgreSQL 12.
810534
810534
Petr Písař: Ported to 3.7.4 from 35080ce5535e233428a7e17320e111962daec7e1.
810534
---
810534
 Pg.pm   | 3 ++-
810534
810534
diff --git a/Pg.pm b/Pg.pm
810534
index 9e0e9d7..13cd68f 100644
810534
--- a/Pg.pm
810534
+++ b/Pg.pm
810534
@@ -530,7 +530,8 @@ use 5.008001;
810534
 			$row->[$col_map{DATA_TYPE}] = DBD::Pg::db::pg_type_info($dbh,$row->[$col_map{DATA_TYPE}]);
810534
 
810534
 			# Add pg_constraint
810534
-			my $SQL = q{SELECT consrc FROM pg_catalog.pg_constraint WHERE contype = 'c' AND }.
810534
+			my $SQL = q{SELECT pg_catalog.pg_get_constraintdef(oid) }.
810534
+				q{FROM pg_catalog.pg_constraint WHERE contype = 'c' AND }.
810534
 				qq{conrelid = $aid AND conkey = '{$attnum}'};
810534
 			my $info = $dbh->selectall_arrayref($SQL);
810534
 			if (@$info) {
810534
-- 
810534
2.21.0
810534