1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

PostgreSQL: Use separator in limit1

This commit is contained in:
Jakub Vrana
2021-05-23 11:08:29 +02:00
parent db01282e29
commit 473f7264f8
3 changed files with 3 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ if (isset($_GET["pgsql"])) {
function limit1($table, $query, $where, $separator = "\n") {
return (preg_match('~^INTO~', $query)
? limit($query, $where, 1, 0, $separator)
: " $query" . (is_view(table_status1($table)) ? $where : " WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)")
: " $query" . (is_view(table_status1($table)) ? $where : $separator . "WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)")
);
}