这是indexloc提供的服务,不要输入任何密码
Skip to content

Regression: _in for UUID columns fails in alpha-29 #1109

@jlowin

Description

@jlowin

Starting in alpha-29, I'm getting an error when trying to use the _in operator for filtering UUID columns. (Note: still present in alpha-30, but it seems to work correctly in alpha-28)

To replicate:

  1. Create a simple test table
create table test (
  id UUID PRIMARY KEY,
  x text
)
  1. Run the following query
{
  test(where: {id: {_in: ["28d6d683-1317-49f7-b1cf-7d195242e4e6"]}}) {
    id
    x
  }
}

Result:

{
  "errors": [
    {
      "internal": {
        "statement": "SELECT  coalesce(json_agg(\"root\" ), '[]' ) AS \"root\" FROM  (SELECT  row_to_json((SELECT  \"_1_e\"  FROM  (SELECT  \"_0_root.base\".\"id\" AS \"id\", \"_0_root.base\".\"x\" AS \"x\"       ) AS \"_1_e\"      ) ) AS \"root\" FROM  (SELECT  *  FROM \"public\".\"test\"  WHERE ((\"public\".\"test\".\"id\") = ANY(ARRAY[$1] ))     ) AS \"_0_root.base\"      ) AS \"_2_root\"      ",
        "prepared": true,
        "error": {
          "exec_status": "FatalError",
          "hint": "No operator matches the given name and argument type(s). You might need to add explicit type casts.",
          "message": "operator does not exist: uuid = text",
          "status_code": "42883",
          "description": null
        },
        "arguments": [
          "(Oid 0,Just (\"28d6d683-1317-49f7-b1cf-7d195242e4e6\",Text))"
        ]
      },
      "path": "$",
      "error": "postgres query error",
      "code": "postgres-error"
    }
  ]
}

Metadata

Metadata

Assignees

Labels

c/serverRelated to servere/quickfixcan be wrapped up in few hoursk/bugSomething isn't workingp/urgentImmediate action required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions