Add some more types
This commit is contained in:
parent
b64ec8b8b8
commit
4c639df91d
|
@ -286,11 +286,13 @@ def parse_column_definition(ps):
|
||||||
ps2.ast = []
|
ps2.ast = []
|
||||||
ps2.skip_whitespace_and_comments()
|
ps2.skip_whitespace_and_comments()
|
||||||
sqltypes = (
|
sqltypes = (
|
||||||
"int", "integer", "serial",
|
"integer", "int", "serial", "bigint",
|
||||||
"boolean",
|
"boolean",
|
||||||
"text", "character varying",
|
"text", "character varying",
|
||||||
"date", "timestamp with time zone", "timestamptz",
|
"date", "timestamp with time zone", "timestamptz",
|
||||||
"time",
|
"time",
|
||||||
|
"inet",
|
||||||
|
"double precision", "float8", "real", "float4",
|
||||||
)
|
)
|
||||||
pattern = "(" + "|".join(sqltypes) + ")" + r"([ \t]+(default .*|not null\b|primary key\b|unique\b|references \w+\b))*"
|
pattern = "(" + "|".join(sqltypes) + ")" + r"([ \t]+(default .*|not null\b|primary key\b|unique\b|references \w+\b))*"
|
||||||
m = ps2.match(pattern)
|
m = ps2.match(pattern)
|
||||||
|
|
Loading…
Reference in New Issue