uqa-sql 0.5.4

PostgreSQL-compatible SQL compiler built on libpg_query
Documentation
[
  {
    "sql": "SELECT coalesce(c COLLATE \"C\",p COLLATE \"POSIX\"), 1+c FROM t",
    "error": {
      "sqlstate": "42883",
      "message": "operator does not exist: integer + text",
      "detail": null,
      "hint": "No operator matches the given name and argument types. You might need to add explicit type casts."
    }
  },
  {
    "sql": "SELECT coalesce(c COLLATE \"C\",p COLLATE \"POSIX\"), missing FROM t",
    "error": {
      "sqlstate": "42703",
      "message": "column \"missing\" does not exist",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(c COLLATE \"C\",p COLLATE \"POSIX\") FROM t WHERE 1",
    "error": {
      "sqlstate": "42804",
      "message": "argument of WHERE must be type boolean, not type integer",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(c COLLATE \"C\",p COLLATE \"POSIX\") FROM t WHERE (p COLLATE \"POSIX\")=(c COLLATE \"C\")",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(t.c COLLATE \"C\",t.p COLLATE \"POSIX\") FROM t JOIN t q ON ('x' COLLATE \"POSIX\")=('y' COLLATE \"ucs_basic\")",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT CASE WHEN (p COLLATE \"POSIX\")=(c COLLATE \"ucs_basic\") THEN c COLLATE \"C\" ELSE p COLLATE \"POSIX\" END FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"POSIX\" and \"ucs_basic\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT CASE WHEN n=1 THEN c COLLATE \"C\" WHEN n=2 THEN p COLLATE \"POSIX\" ELSE coalesce(c COLLATE \"ucs_basic\",p COLLATE \"C\") END FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(c COLLATE \"C\",p COLLATE \"POSIX\",coalesce(c COLLATE \"ucs_basic\",p COLLATE \"C\")) FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT ROW(coalesce(c COLLATE \"C\",p COLLATE \"POSIX\"),coalesce(c COLLATE \"ucs_basic\",p COLLATE \"C\")) FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce((NOT((c COLLATE \"C\")=(p COLLATE \"POSIX\")))::text,c COLLATE \"ucs_basic\",p COLLATE \"POSIX\") FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT 1 FROM t WHERE (c COLLATE \"C\")=(p COLLATE \"POSIX\")",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce((count(*) FILTER(WHERE (c COLLATE \"C\")=(p COLLATE \"POSIX\")))::text,'a' COLLATE \"ucs_basic\",'b' COLLATE \"POSIX\") FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(((c COLLATE \"C\") IN (p COLLATE \"POSIX\"))::text,c COLLATE \"ucs_basic\",p COLLATE \"POSIX\") FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  },
  {
    "sql": "SELECT coalesce(((c COLLATE \"C\") BETWEEN (p COLLATE \"POSIX\") AND c)::text,c COLLATE \"ucs_basic\",p COLLATE \"POSIX\") FROM t",
    "error": {
      "sqlstate": "42P21",
      "message": "collation mismatch between explicit collations \"C\" and \"POSIX\"",
      "detail": null,
      "hint": null
    }
  }
]