Skip to content

Formatting fails on @> operator in postgres #3

Open
@nathanpalmer

Description

@nathanpalmer
  1. Which app are you using (JSON, XML, SQL):

SQL

  1. The steps to reproduce this issue:

PostgreSQL has an array contains and not contains operator using @> and <@. You can find some details here

https://www.postgresql.org/docs/11/functions-array.html

When this query is used to get formatted it's adding a space between the @ and > which is not valid.

Test Query

select * 
from orders
where orders.tags @> '["tag1"]'

Turns into

select
  *
from
  orders
where
  orders.tags @ > '["tag1"]'

which fill fail for operator does not exist: jsonb @

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions