]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Print errors in export
authorJakub Vrana <jakub@vrana.cz>
Wed, 26 Feb 2025 18:29:22 +0000 (19:29 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 26 Feb 2025 18:37:18 +0000 (19:37 +0100)
adminer/drivers/pgsql.inc.php

index 0527aa00ef529e4d20ffc2f632f3b23b8c05f584..3e254830b5e0f8c6d513497e06128cac84e797b4 100644 (file)
@@ -797,10 +797,10 @@ AND typelem = 0"
                        // sequences for fields
                        if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
                                $sequence_name = $matches[1];
-                               $sq = reset(get_rows(min_version(10)
+                               $sq = reset(get_rows((min_version(10)
                                        ? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q(idf_unescape($sequence_name))
                                        : "SELECT * FROM $sequence_name"
-                               ));
+                               ), null, "-- "));
                                $sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
                                        . "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value]"
                                        . ($auto_increment && $sq['last_value'] ? " START " . ($sq["last_value"] + 1) : "")
@@ -831,7 +831,7 @@ AND typelem = 0"
                        }
                }
 
-               foreach (get_rows("SELECT indexdef FROM pg_catalog.pg_indexes WHERE schemaname = current_schema() AND tablename = " . q($table)) as $row) {
+               foreach (get_rows("SELECT indexdef FROM pg_catalog.pg_indexes WHERE schemaname = current_schema() AND tablename = " . q($table), null, "-- ") as $row) {
                        $return .= "\n\n$row[indexdef];";
                }