Skip to content

Conversation

@jnlt3
Copy link
Contributor

@jnlt3 jnlt3 commented Dec 19, 2025

Related to: #1994

The PR fixes the issue with semicolons disappearing when SHOW statements are parsed. The test prior to the fix would fail as follows:

assertion `left == right` failed
  left: "SHOW search_path; SELECT 1"
 right: "SHOW search_path SELECT"

The fix adds a Semicolon alongside EOF and Eq which were the only two tokens that triggered a break in parse_identifiers. This should not cause any unintended side effects as semicolons are exclusively used for statement ends.

Additional considerations:

  • The parse_show test requires SHOW ALL ALL to be parsed. This is not valid PostgreSQL syntax according to postgres 18 docs and was not valid since version 7.1 at least.
  • parse_identifiers is seemingly supposed to be very relaxed (as indicated by the above test not failing) and also is used only twice in the code base. The first instance is SHOW, the other is the DROP that comes after a pipe operator for which the current tests do not need the extra flexibility provided by parse_identifiers.

I am willing to make a separate PR for modifying the parse_show test to use valid PostgreSQL syntax, I am not familiar enough with the code base to do anything with the latter.

@jnlt3 jnlt3 force-pushed the parse-identifiers-semicolon-handling branch from be7148a to 3864206 Compare December 19, 2025 07:30
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.

1 participant