Add some more types

This commit is contained in:
Peter J. Holzer 2023-03-03 07:05:30 +01:00
parent b64ec8b8b8
commit 4c639df91d
1 changed files with 3 additions and 1 deletions

View File

@ -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)