From 6c3437a5f1e960a9e182604c734349ca45d85c18 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Fri, 18 Aug 2023 15:21:06 +0200 Subject: [PATCH] Add JSON types --- setup.cfg | 2 +- src/procrusql/parser.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 791ae90..1d15854 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ProcruSQL -version = 0.0.11 +version = 0.0.12 author = Peter J. Holzer author_email = hjp@hjp.at description = Make a database fit its description diff --git a/src/procrusql/parser.py b/src/procrusql/parser.py index e30a127..3b14a19 100755 --- a/src/procrusql/parser.py +++ b/src/procrusql/parser.py @@ -293,6 +293,7 @@ def parse_column_definition(ps): "time", "inet", "double precision", "float8", "real", "float4", + "json", "jsonb", ) pattern = "(" + "|".join(sqltypes) + ")" + r"([ \t]+(default .*|not null\b|primary key\b|unique\b|references \w+\b))*" m = ps2.match(pattern)