From: jenkins-bot Date: Thu, 14 Nov 2019 18:49:48 +0000 (+0000) Subject: Merge "rdbms: Remove references to pg_attrdef.adsrc in Postgres code" into REL1_31 X-Git-Tag: 1.31.6~13 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=dfa3ec11928f5a4c6eddb5be6ddefe9a4294c0fe;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "rdbms: Remove references to pg_attrdef.adsrc in Postgres code" into REL1_31 --- dfa3ec11928f5a4c6eddb5be6ddefe9a4294c0fe diff --combined includes/libs/rdbms/database/DatabasePostgres.php index c4f05c5411,299eb3cd23..9b09f96b40 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@@ -119,7 -119,7 +119,7 @@@ class DatabasePostgres extends Databas $connectVars['port'] = (int)$this->port; } if ( $this->flags & self::DBO_SSL ) { - $connectVars['sslmode'] = 1; + $connectVars['sslmode'] = 'require'; } $this->connectString = $this->makeConnectionString( $connectVars ); @@@ -816,7 -816,7 +816,7 @@@ __INDEXATTR__ . ' WHERE relkind = \'r\'' . ' AND nspname = ' . $this->addQuotes( $this->getCoreSchema() ) . ' AND relname = ' . $this->addQuotes( $oldName ) - . ' AND adsrc LIKE \'nextval(%\'', + . ' AND pg_get_expr(adbin, adrelid) LIKE \'nextval(%\'', $fname ); $row = $this->fetchObject( $res ); @@@ -851,10 -851,10 +851,10 @@@ } $oid = $this->fetchObject( $res )->oid; - $res = $this->query( 'SELECT adsrc FROM pg_attribute a' + $res = $this->query( 'SELECT pg_get_expr(adbin, adrelid) AS adsrc FROM pg_attribute a' . ' JOIN pg_attrdef d ON (a.attrelid=d.adrelid and a.attnum=d.adnum)' . " WHERE a.attrelid = $oid" - . ' AND adsrc LIKE \'nextval(%\'', + . ' AND pg_get_expr(adbin, adrelid) LIKE \'nextval(%\'', $fname ); $row = $this->fetchObject( $res );