[Tickets #14964] Postgresql12 dropped adsrc

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Nov 14 12:44:53 UTC 2019


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14964
------------------------------------------------------------------------------
  Ticket             | 14964
  Created By         | christian.ehrhardt at canonical.com
  Summary            | Postgresql12 dropped adsrc
  Queue              | Components
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


christian.ehrhardt at canonical.com (2019-11-14 12:44) wrote:

Hi,
the DB component still makes use of "adsrc".

This is a postgresql feature [1] that was deprecated for years and is  
now gone. [1] also contains a hint how it should be used.

This is still in some Horde code:
$ grep -Hrn adsrc *
lib/Horde/Db/Adapter/Postgresql/Schema.php:361:                 
$row['attname'], $row['adsrc'], $row['format_type'],  
!(boolean)$row['attnotnull']);
lib/Horde/Db/Adapter/Postgresql/Schema.php:391:            SELECT  
a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
lib/Horde/Db/Adapter/Postgresql/Schema.php:1136:                WHEN  
split_part(def.adsrc, '''', 2) ~ '.' THEN
lib/Horde/Db/Adapter/Postgresql/Schema.php:1137:                   
substr(split_part(def.adsrc, '''', 2),
lib/Horde/Db/Adapter/Postgresql/Schema.php:1138:                        
   strpos(split_part(def.adsrc, '''', 2), '.')+1)
lib/Horde/Db/Adapter/Postgresql/Schema.php:1139:                ELSE  
split_part(def.adsrc, '''', 2)
lib/Horde/Db/Adapter/Postgresql/Schema.php:1147:              AND  
def.adsrc ~* 'nextval'";

Which leads to errors like the following (on test):
There were 12 errors:

1) Horde_Db_Adapter_Pdo_PgsqlTest::testColumns
Horde_Db_Exception: SQLSTATE[42703]: Undefined column: 7 ERROR:   
column d.adsrc does not exist
LINE 2: ... a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a...
                                                              ^

/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Pdo/Base.php:237
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Pdo/Base.php:109
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Base/Schema.php:166
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Postgresql/Schema.php:385
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Postgresql/Schema.php:347
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/lib/Horde/Db/Adapter/Base.php:274
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/test/Horde/Db/Adapter/TestBase.php:519
/tmp/autopkgtest.uUKdVj/build.XmB/src/Horde_Db-2.4.0/test/Horde/Db/Adapter/Pdo/PgsqlTest.php:159

Caused by
PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR:  column  
d.adsrc does not exist
LINE 2: ... a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a...
...

[1]: https://www.postgresql.org/docs/8.3/catalog-pg-attrdef.html





More information about the bugs mailing list