Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -766,8 +766,8 @@ |
767 | 767 | $q = <<<SQL |
768 | 768 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
769 | 769 | WHERE relnamespace=pg_namespace.oid AND relkind='r' |
770 | | - AND tgrelid=pg_class.oid |
771 | | - AND nspname=%s AND relname=%s AND tgname=%s |
| 770 | + AND tgrelid=pg_class.oid |
| 771 | + AND nspname=%s AND relname=%s AND tgname=%s |
772 | 772 | SQL; |
773 | 773 | $res = $this->query( |
774 | 774 | sprintf( |
— | — | @@ -878,7 +878,11 @@ |
879 | 879 | } elseif ( is_bool( $s ) ) { |
880 | 880 | return intval( $s ); |
881 | 881 | } elseif ( $s instanceof Blob ) { |
882 | | - return "'" . $s->fetch( $s ) . "'"; |
| 882 | + $ret = "'" . $s->fetch( $s ) . "'"; |
| 883 | + if ( $this->numeric_version >= 8.1 ) { |
| 884 | + $ret = "E$ret"; |
| 885 | + } |
| 886 | + return $ret; |
883 | 887 | } |
884 | 888 | return "'" . pg_escape_string( $this->mConn, $s ) . "'"; |
885 | 889 | } |