Skip to content

Commit

Permalink
fixed query in getTableConstraintDefinition() for FK constraints in t…
Browse files Browse the repository at this point in the history
…he Reverse module (thanks to André Restivo)

git-svn-id: http://svn.php.net/repository/pear/packages/MDB2/trunk@255058 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
quipo committed Mar 13, 2008
1 parent fbf7604 commit a3893db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MDB2/Driver/Reverse/pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function getTableConstraintDefinition($table_name, $constraint_name)
$query = 'SELECT a.attname
FROM pg_constraint c
LEFT JOIN pg_class t ON c.confrelid = t.oid
LEFT JOIN pg_attribute a ON a.attrelid = t.oid AND a.attnum = ANY(c.conkey)
LEFT JOIN pg_attribute a ON a.attrelid = t.oid AND a.attnum = ANY(c.confkey)
WHERE c.conname = %s
AND t.relname = ' . $db->quote($definition['references']['table'], 'text');
$constraint_name_mdb2 = $db->getIndexName($constraint_name);
Expand Down
2 changes: 2 additions & 0 deletions package_pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
- request #13106: added unixtimestamp() in the Function module
- fixed bug #13281: list FOREIGN KEY constraints in listTableConstraints() in the Manager module
- fixed bug #13356: added float4 to _mapNativeDatatype()
- fixed query in getTableConstraintDefinition() for FK constraints in the Reverse module
(thanks to André Restivo)
open todo items:
- enable pg_execute() once issues with bytea column are resolved
Expand Down

0 comments on commit a3893db

Please sign in to comment.