Skip to content

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Jul 22, 2022

Fixes #54

PR fixes a bug where if a psql parameter was followed by a non-number character (e.g. a comma), it would include the character in the parameter value. The issue was that we were only rewinding our state when we broke out of value identifier for a whitespace character, when it should be any character, which is covered by checking for nextChar !== null.

Included a test both within the tokenizer where the bug was, as well at the identify level just for sanity checking.

@MasterOdin MasterOdin force-pushed the fix-psql-parameters branch from aac74da to 5a5910d Compare July 22, 2022 15:51
@MasterOdin MasterOdin requested a review from rathboma July 22, 2022 15:51
@MasterOdin MasterOdin merged commit eb078e9 into main Aug 1, 2022
@MasterOdin MasterOdin deleted the fix-psql-parameters branch August 1, 2022 18:26
@rathboma
Copy link
Contributor

rathboma commented Aug 1, 2022

Sorry just saw this. Good stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Queries with params immediately followed by a , show the comma as part of the parameter name (PSQL)
2 participants