You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it can not parse Postgres create table sql , with partition by, example:
sql = """create table aaa
(
id integer default nextval('aaa_id_seq'::regclass) not null,
name varchar
) partition by RANGE (name)"""
print(psqlparse.parse(sql))
throw an exception as:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1491, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/chuxiangfeng/PycharmProjects/pythonEffectiveS/tools/sqlparse.py", line 14, in
print(psqlparse.parse(sql))
File "psqlparse/parser.pyx", line 28, in psqlparse.parser.parse (psqlparse/parser.c:1042)
psqlparse.exceptions.PSqlParseError: syntax error at or near "partition"
The text was updated successfully, but these errors were encountered:
it can not parse Postgres create table sql , with partition by, example:
sql = """create table aaa
(
id integer default nextval('aaa_id_seq'::regclass) not null,
name varchar
) partition by RANGE (name)"""
print(psqlparse.parse(sql))
throw an exception as:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1491, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/chuxiangfeng/PycharmProjects/pythonEffectiveS/tools/sqlparse.py", line 14, in
print(psqlparse.parse(sql))
File "psqlparse/parser.pyx", line 28, in psqlparse.parser.parse (psqlparse/parser.c:1042)
psqlparse.exceptions.PSqlParseError: syntax error at or near "partition"
The text was updated successfully, but these errors were encountered: