-
Notifications
You must be signed in to change notification settings - Fork 17
is_valid() gives false negative with PostgreSQL limit clause #49
Open
Description
I found the following case which seems to me to be a false negative. According to PG's documentation, setting LIMIT to either NULL or ALL should result in fetching all available rows (and it does).
import sqlvalidator
first_query = 'SELECT * FROM "my_table" LIMIT 10'
second_query = 'SELECT * FROM "my_table" LIMIT NULL'
Both these queries work as expected when run. However
>>> sqlvalidator.parse(first_query).is_valid()
True
>>> sqlvalidator.parse(second_query).is_valid()
False
Let me know if there's any piece of information I might have missed. If this case was considered already or it falls outside the scope of this tool feel free to close this issue.
Cheers.
Activity
Metadata
Metadata
Assignees
Labels
No labels