-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table name being parsed as a Function #217
Comments
I see this also in situations where a table name is followed by parentheses: >>> sqlparse.parse('create table asdf.pants (id serial);')[0].tokens[4].tokens
[<Name 'asdf' at 0x1066ad9a8>,
<Punctuation '.' at 0x1066ad9f8>,
<Function 'pants ...' at 0x10669de48>] |
The column_defs_lowlevel.py in examples runs error due to the same problem... |
Caused by |
any one solve it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
There is an issue when I try to parse this SQL statement:
INSERT INTO XYZ (ID, TYPE, DATA, TRANSACTION_ID, ENQUEUING_TIME, AVAILABILITY_TIME, LAST_RETRY_TIME, ATTEMPTS_COUNT, DEPENDENCY_INDICATOR, REJECT_QUEUE_INDICATOR, PEAK_TOKEN, LOGICAL_TRANSACTION_TIME)
VALUES (?,
?,
?,
?,
SYSDATE,
SYSDATE + ? / 86400,
NULL,
?,
?,
?,
?,
?)
When I parse it, I have this tag:
DML 'INSERT' at 0x06dc050>,
Whitespace ' ' at 0x06dc0a8>,
Keyword 'INTO' at 0x06dc100>,
Whitespace ' ' at 0x06dc158>,
Function 'XYZ ...' at 0x05f8f30>,
Whitespace ' ' at 0x077ed08>,
Keyword 'VALUES' at 0x077e9f0>,
Whitespace ' ' at 0x077eb50>,
Parenthesis '( ?, ?...' at 0x05f8ea8>
So the table name XYZ is being tagged as a Function.
Thank you for looking into it.
The text was updated successfully, but these errors were encountered: