Skip to content

[FEATURE] BETWEEN SYMMETRIC not supported #2250

@tomershay

Description

@tomershay

Relevant PG docs: https://www.postgresql.org/docs/current/functions-comparison.html

Steps to reproduce:

CREATE TABLE orders (
    id SERIAL PRIMARY KEY,
    total_price NUMERIC,
    discount_price NUMERIC
);

INSERT INTO orders (total_price, discount_price) VALUES
      (120, 80),     -- 100 is between these (SYMMETRIC: yes)
      (150, 200),    -- 100 is NOT between these
      (90, 110),     -- 100 is between these
      (50, 50),      -- 100 is NOT between
      (130, 70);     -- 100 is between these (SYMMETRIC: yes)

SELECT *
FROM orders
WHERE 100 BETWEEN SYMMETRIC total_price AND discount_price;

The parsing error:

Image

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions