X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabasePostgres.php;h=299eb3cd23282eef8b075c86ea326e40f342aca3;hb=2cecc8d7be6213c7d03d072882b51680e94e06db;hp=94509a3c023ace981ca16d42bdbae0b58624cacf;hpb=5bbace1a3667997a6ecc94c2d7259615bdc4176c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index 94509a3c02..299eb3cd23 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -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 @@ __INDEXATTR__; } $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 );