Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -639,9 +639,7 @@ |
640 | 640 | if ( preg_match( '/(^|\s)(DISTINCT|JOIN|ON|AS)(\s|$)/i', $name ) !== 0 ) { |
641 | 641 | return $name; |
642 | 642 | } |
643 | | - # Split database and table into proper variables. |
644 | | - # We reverse the explode so that schema.table and table both output |
645 | | - # the correct table. |
| 643 | + # Extract the database prefix, if any and quote it |
646 | 644 | $dbDetails = explode( '.', $name, 2 ); |
647 | 645 | if ( isset( $dbDetails[1] ) ) { |
648 | 646 | $schema = '"' . $dbDetails[0] . '".'; |