diff options
author | alecpl <alec@alec.pl> | 2008-05-02 07:35:00 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-05-02 07:35:00 +0000 |
commit | d1403fd7268ccf96ab6e7d04506ea1b1802c7eb2 (patch) | |
tree | 8f830c1c80eeedc9cff5a041208255d8d8e008c9 /program/lib/MDB2/Driver/Reverse/pgsql.php | |
parent | bbf15d8115e19bf12b156e2a4d52221bcae40d6c (diff) |
- fixed #1485032 and updated MDB2 package+drivers
Diffstat (limited to 'program/lib/MDB2/Driver/Reverse/pgsql.php')
-rw-r--r-- | program/lib/MDB2/Driver/Reverse/pgsql.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/program/lib/MDB2/Driver/Reverse/pgsql.php b/program/lib/MDB2/Driver/Reverse/pgsql.php index 930eea93f..7d5c9f134 100644 --- a/program/lib/MDB2/Driver/Reverse/pgsql.php +++ b/program/lib/MDB2/Driver/Reverse/pgsql.php @@ -2,7 +2,7 @@ // +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
-// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
+// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
@@ -43,7 +43,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: pgsql.php,v 1.68 2007/11/25 13:38:29 quipo Exp $
+// $Id: pgsql.php,v 1.70 2008/03/13 20:38:09 quipo Exp $
require_once 'MDB2/Driver/Reverse/Common.php';
@@ -358,7 +358,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common $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);
@@ -424,7 +424,10 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common WHEN 24 THEN 'UPDATE, DELETE'
WHEN 12 THEN 'INSERT, DELETE'
END AS trigger_event,
- trg.tgenabled AS trigger_enabled,
+ CASE trg.tgenabled
+ WHEN 'O' THEN 't'
+ ELSE trg.tgenabled
+ END AS trigger_enabled,
obj_description(trg.oid, 'pg_trigger') AS trigger_comment
FROM pg_trigger trg,
pg_class tbl,
|