MDL-67414 adodb: Backport upstream fix for PostgreSQL 12.x

Upstream: https://github.com/ADOdb/ADOdb/commit/a4876f100602c2ce4760bb72d3050f73387adcca
          pgsql: stop using obsolete pg_attrdef.adsrc column
This commit is contained in:
Matteo Scaramuccia
2020-01-26 09:40:22 +01:00
parent 05a89b9b45
commit ec2ea6c725
2 changed files with 8 additions and 1 deletions
@@ -20,6 +20,12 @@ class ADODB_postgres8 extends ADODB_postgres7
{
var $databaseType = 'postgres8';
// From PostgreSQL 8.0 onwards, the adsrc column used in earlier versions to
// retrieve the default value is obsolete and should not be used (see #562).
var $metaDefaultsSQL = "SELECT d.adnum as num, pg_get_expr(d.adbin, d.adrelid) as def
FROM pg_attrdef d, pg_class c
WHERE d.adrelid=c.oid AND c.relname='%s'
ORDER BY d.adnum";
/**
* Retrieve last inserted ID
+2 -1
View File
@@ -31,5 +31,6 @@ Our changes:
* MDL-52286 Added muting erros in ADORecordSet::__destruct().
Check if fixed upstream during the next upgrade and remove this note. (8638b3f1441d4b928)
* MDL-67034 Fixes to make the library php74 compliant.
* MDL-67414 Fix to make the library PostgreSQL 12.x compliant (upstream: a4876f100602c2ce4).
skodak, iarenaza, moodler, stronk7, abgreeve, lameze, ankitagarwal, marinaglancy
skodak, iarenaza, moodler, stronk7, abgreeve, lameze, ankitagarwal, marinaglancy, matteo