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

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