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

PostgreSQL: Fix setting NULL and original value on enum (bug #884)

This commit is contained in:
Jakub Vrana
2025-03-08 06:44:12 +01:00
parent e7c3a046a7
commit b0450d0d2a
5 changed files with 22 additions and 10 deletions

View File

@@ -1159,7 +1159,7 @@ if (!defined('Adminer\DRIVER')) {
/** Convert value in edit after applying functions back
* @param array one element from fields()
* @param string
* @param string SQL expression
* @return string
*/
function unconvert_field($field, $return) {

View File

@@ -234,6 +234,11 @@ if (isset($_GET["pgsql"])) {
}
}
function enumLength($field) {
$enum = $this->types[lang('User types')][$field["type"]];
return ($enum ? type_values($enum) : "");
}
function setUserTypes($types) {
$this->types[lang('User types')] = array_flip($types);
}