Fix whitespace
This commit is contained in:
parent
660703e422
commit
e148db4b0f
|
@ -350,7 +350,7 @@ WHERE relkind IN ('r', 'm', 'v', 'f')
|
||||||
'timestamp with time zone' => 'timestamptz',
|
'timestamp with time zone' => 'timestamptz',
|
||||||
);
|
);
|
||||||
|
|
||||||
$identity_column = min_version(10) ? "(a.attidentity = 'd')::int" : '0';
|
$identity_column = min_version(10) ? "(a.attidentity = 'd')::int" : '0';
|
||||||
|
|
||||||
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, $identity_column AS identity
|
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, $identity_column AS identity
|
||||||
FROM pg_class c
|
FROM pg_class c
|
||||||
|
@ -376,8 +376,8 @@ ORDER BY a.attnum"
|
||||||
$row["full_type"] = $row["type"] . $length . $addon . $array;
|
$row["full_type"] = $row["type"] . $length . $addon . $array;
|
||||||
}
|
}
|
||||||
if ($row['identity']) {
|
if ($row['identity']) {
|
||||||
$row['default'] = 'GENERATED BY DEFAULT AS IDENTITY';
|
$row['default'] = 'GENERATED BY DEFAULT AS IDENTITY';
|
||||||
}
|
}
|
||||||
$row["null"] = !$row["attnotnull"];
|
$row["null"] = !$row["attnotnull"];
|
||||||
$row["auto_increment"] = $row['identity'] || preg_match('~^nextval\(~i', $row["default"]);
|
$row["auto_increment"] = $row['identity'] || preg_match('~^nextval\(~i', $row["default"]);
|
||||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
||||||
|
|
Loading…
Reference in a new issue