Skip to content

Postgres: Support BETWEEN SYMMETRIC / ASYMMETRIC - #2522

Open
BenSatori wants to merge 1 commit into
apache:mainfrom
BenSatori:postgres-between-symmetric
Open

BenSatori wants to merge 1 commit into
apache:mainfrom
BenSatori:postgres-between-symmetric

Conversation

@BenSatori

Copy link
Copy Markdown
Contributor

Before this fix, PostgreSQL's BETWEEN SYMMETRIC / BETWEEN ASYMMETRIC modifier wasn't parsed:

SELECT * FROM customers WHERE a NOT BETWEEN SYMMETRIC 10 AND 1;

This adds a symmetric field to Expr::Between and parses the optional SYMMETRIC/ASYMMETRIC keyword after BETWEEN (per the SQL standard / PostgreSQL docs: https://www.postgresql.org/docs/current/functions-comparison.html). ASYMMETRIC is the default behavior and is not round-tripped in the displayed SQL.

AI assistance disclosure: this change was drafted with GitHub Copilot.

Adds parsing for the SQL standard BETWEEN SYMMETRIC / ASYMMETRIC modifiers, e.g. `a NOT BETWEEN SYMMETRIC 10 AND 1`.

See https://www.postgresql.org/docs/current/functions-comparison.html
@BenSatori BenSatori changed the title General: Support BETWEEN SYMMETRIC / ASYMMETRIC Postgres: Support BETWEEN SYMMETRIC / ASYMMETRIC Sep 17, 2026
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