Adminer version: 6.0.1
Compiled: single file (official Docker image adminer:6.0.1, PHP 8.4.24)
Driver: PDO_PgSQL
Database version: PostgreSQL 13.23
Plugins used: none
Summary
Importing a SQL file produced by Adminer's own Export page always ends with Error in query: Unknown error. The "query" that fails is the timestamp comment that dumpFooter() appends to every export.
Steps to reproduce
- Export any table → Format SQL (any table/data style). The file ends with:
INSERT INTO "t" ("id", "b") VALUES
(1, '1'),
(2, 0);
-- 2026-08-28 15:55:44 UTC
- Import the file on the Import page ("File upload" or "From server"), with Stop on error unchecked so the whole file runs.
The output ends with:
-- 2026-08-28 14:28:29 UTC
Error in query: Unknown error.
17 queries executed OK. (0.151 s)
The trailing comment has no terminating semicolon, so the remaining comment-only text is sent to the server as a statement; PDO returns neither a result set nor an error message, hence "Unknown error". With Stop on error checked the import is reported as failed even though every real statement succeeded (psql imports the same file without complaint — it skips the trailing comment).
Expected
Comment-only / whitespace-only text at the end of the file is skipped instead of being executed, or the footer is emitted in a form the importer ignores.
Adminer version: 6.0.1
Compiled: single file (official Docker image
adminer:6.0.1, PHP 8.4.24)Driver: PDO_PgSQL
Database version: PostgreSQL 13.23
Plugins used: none
Summary
Importing a SQL file produced by Adminer's own Export page always ends with
Error in query: Unknown error.The "query" that fails is the timestamp comment thatdumpFooter()appends to every export.Steps to reproduce
The output ends with:
The trailing comment has no terminating semicolon, so the remaining comment-only text is sent to the server as a statement; PDO returns neither a result set nor an error message, hence "Unknown error". With Stop on error checked the import is reported as failed even though every real statement succeeded (
psqlimports the same file without complaint — it skips the trailing comment).Expected
Comment-only / whitespace-only text at the end of the file is skipped instead of being executed, or the footer is emitted in a form the importer ignores.