From b500a46f9a02cc2cc3565bf75e93acb34405c6c7 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 6 Feb 2018 16:24:12 +0100 Subject: [PATCH] Add truncate_sql to PostgreSQL --- adminer/drivers/pgsql.inc.php | 4 ++++ changes.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index b8f40bc4..b27a7aee 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -747,6 +747,10 @@ AND typelem = 0" return rtrim($return, ';'); } + function truncate_sql($table) { + return "TRUNCATE " . table($table); + } + function trigger_sql($table) { $status = table_status($table); $return = ""; diff --git a/changes.txt b/changes.txt index 87cfb485..87a03f32 100644 --- a/changes.txt +++ b/changes.txt @@ -5,6 +5,7 @@ PostgreSQL: Support binary files in bytea fields PostgreSQL: Cast to string when searching using LIKE (bug #325) PostgreSQL: Don't treat interval type as number (bug #474) PostgreSQL: Fix condition for selecting no rows +PostgreSQL: Support TRUNCATE+INSERT export Adminer 4.6.0 (released 2018-02-05): Fix counting selected rows after going back to select page