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

PostgreSQL: Fix parsing of foreign keys with non-ASCII column names (thanks to Tomas Pecina)

This commit is contained in:
Jakub Vrana
2021-05-14 06:21:09 +02:00
parent a12d31c5a8
commit 60ad161178
4 changed files with 11 additions and 7 deletions

View File

@@ -29,6 +29,9 @@ function version() {
* @return string
*/
function idf_unescape($idf) {
if (!preg_match('~^[`\'"]~', $idf)) {
return $idf;
}
$last = substr($idf, -1);
return str_replace($last . $last, $last, substr($idf, 1, -1));
}