mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
PostgreSQL: Constraint enum values in editing (bug #270)
This commit is contained in:
@@ -729,7 +729,7 @@ ORDER BY SPECIFIC_NAME');
|
||||
}
|
||||
|
||||
function types() {
|
||||
return get_vals("SELECT typname
|
||||
return get_key_vals("SELECT oid, typname
|
||||
FROM pg_type
|
||||
WHERE typnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
|
||||
AND typtype IN ('b','d','e')
|
||||
@@ -752,9 +752,9 @@ AND typelem = 0"
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = $connection2->query("SET search_path TO " . idf_escape($schema));
|
||||
foreach (types() as $type) { //! get types from current_schemas('t')
|
||||
foreach (types() as $key => $type) { //! get types from current_schemas('t')
|
||||
if (!isset($types[$type])) {
|
||||
$types[$type] = 0;
|
||||
$types[$type] = $key;
|
||||
$structured_types[lang('User types')][] = $type;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user