Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

xrmx
Copy link
Member

@xrmx xrmx commented Feb 22, 2024

What does this pull request do?

Dollar quotes follow the same rules as SQL identifiers so:

SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).

Given we are not going to write a compliant SQL parser at least handle query parameters that are simple to catch since they have a digit right after the opening $.

Related issues

Refs #1851

@github-actions github-actions bot added agent-python community Issues opened by the community triage Issues awaiting triage labels Feb 22, 2024
@xrmx xrmx force-pushed the improve-postgres-parsing-1851 branch 3 times, most recently from a5ffbc6 to a50d687 Compare February 22, 2024 16:13
…ore correct

Dollar quotes follow the same rules as SQL identifiers so:

SQL identifiers and key words must begin with a letter (a-z, but also
letters with diacritical marks and non-Latin letters) or an underscore (_).
Subsequent characters in an identifier or key word can be letters,
underscores, digits (0-9), or dollar signs ($).

Given we are not going to write a compliant SQL parser at least handle
query parameters that are simple to catch since they have a digit right
after the opening $.

Refs elastic#1851.
@xrmx xrmx force-pushed the improve-postgres-parsing-1851 branch from a50d687 to b82a7aa Compare February 22, 2024 16:15
Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@xrmx xrmx merged commit 47fad62 into elastic:main Feb 23, 2024
xrmx added a commit that referenced this pull request Mar 20, 2024
…ore correct (#1976)

Dollar quotes follow the same rules as SQL identifiers so:

SQL identifiers and key words must begin with a letter (a-z, but also
letters with diacritical marks and non-Latin letters) or an underscore (_).
Subsequent characters in an identifier or key word can be letters,
underscores, digits (0-9), or dollar signs ($).

Given we are not going to write a compliant SQL parser at least handle
query parameters that are simple to catch since they have a digit right
after the opening $.

Refs #1851.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-python community Issues opened by the community triage Issues awaiting triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants