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

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