-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column adsrc
does not exist in PostgreSQL 12
#562
Comments
Which is expected, since PostgreSQL 12 release notes says:
It turns out that this column has been marked as obsolete since Postgres 8.0- The user manual recommends to use |
adsrc
does not exist in PostgreSQL 12
@maniamadrid I don't have access to a pgsql instance at the moment. Would you be able to confirm, whether the following patch fixes the issue ? diff --git a/drivers/adodb-postgres64.inc.php b/drivers/adodb-postgres64.inc.php
index bec7528b..1a5e1e3c 100644
--- a/drivers/adodb-postgres64.inc.php
+++ b/drivers/adodb-postgres64.inc.php
@@ -105,7 +105,7 @@ class ADODB_postgres64 extends ADOConnection{
var $_genIDSQL = "SELECT NEXTVAL('%s')";
var $_genSeqSQL = "CREATE SEQUENCE %s START %s";
var $_dropSeqSQL = "DROP SEQUENCE %s";
- var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum";
+ 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";
var $random = 'random()'; /// random function
var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4
// http://bugs.php.net/bug.php?id=25404 |
i have tried your hotfix and the problem solved. Thank you for your fast response. |
Thanks for testing and confirmation. I'll integrate the patch in the next release. |
Problem with d.adsrc in var $metaDefaultsSQL in files ../drivers/adodb-pdo_pgsql.inc.php and ../drivers/adodb-postgres64.inc.php for postgre 12
The text was updated successfully, but these errors were encountered: