]> git.joonet.de Git - adminer.git/commitdiff
Use shortest PostgreSQL $$
authorJakub Vrana <jakub@vrana.cz>
Sun, 24 Oct 2010 06:25:40 +0000 (08:25 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 24 Oct 2010 06:25:40 +0000 (08:25 +0200)
adminer/sql.inc.php

index 5e1a0cd02afcc82e324e8684880fb94ca3e43390..cdfa0878a2b89733a53520bd066fd41cbfa8274b 100644 (file)
@@ -41,7 +41,7 @@ if (!$error && $_POST) {
                }
                $commands = 0;
                $errors = array();
-               $parse = '[\'`"]' . ($jush == "pgsql" ? '|\\$.*\\$' : ($jush == "mssql" || $jush == "sqlite" ? '|\\[' : '')) . '|/\\*|-- |#'; //! ` and # not everywhere
+               $parse = '[\'`"]' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : ($jush == "mssql" || $jush == "sqlite" ? '|\\[' : '')) . '|/\\*|-- |#'; //! ` and # not everywhere
                while ($query != "") {
                        if (!$offset && $jush == "sql" && preg_match('~^\\s*DELIMITER\\s+(.+)~i', $query, $match)) {
                                $delimiter = $match[1];