Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

2.2 KB
Raw Blame
- statement: CREATE TABLE t(a int, b int);
  ignore_case_sensitive: false
  want: |-
    {
      "name":  "postgres",
      "schemas":  [
        {
          "name":  "public",
          "tables":  [
            {
              "name":  "t",
              "columns":  [
                {
                  "name":  "a",
                  "position":  1,
                  "nullable":  true,
                  "type":  "integer"
                },
                {
                  "name":  "b",
                  "position":  2,
                  "nullable":  true,
                  "type":  "integer"
                }
              ]
            },
            {
              "name":  "test",
              "columns":  [
                {
                  "name":  "id",
                  "position":  1,
                  "type":  "int"
                },
                {
                  "name":  "name",
                  "position":  2,
                  "nullable":  true,
                  "type":  "varchar(20)"
                }
              ]
            }
          ],
          "views":  [
            {
              "name":  "v1",
              "definition":  "SELECT id, name FROM test",
              "dependencyColumns":  [
                {
                  "schema":  "public",
                  "table":  "test",
                  "column":  "id"
                },
                {
                  "schema":  "public",
                  "table":  "test",
                  "column":  "name"
                }
              ]
            }
          ]
        }
      ]
    }
  advice: null
- statement: |-
    CREATE TABLE public.t(a int, "B" int);
    CREATE INDEX ON t(a, "B");
    CREATE UNIQUE INDEX ON t(a, "B");
    DROP INDEX IF EXISTS t_a_B_idx_11111;
  ignore_case_sensitive: false
  want: ""
  advice: null
- statement: CREATE TABLE t_default_identifier(a text DEFAULT "status");
  ignore_case_sensitive: false
  want: ""
  advice:
    code: 260
    content: "ERROR: cannot use column reference in DEFAULT expression (SQLSTATE 0A000)"
- statement: CREATE TABLE t_default_column(a int, b int DEFAULT a);
  ignore_case_sensitive: false
  want: ""
  advice:
    code: 260
    content: "ERROR: cannot use column reference in DEFAULT expression (SQLSTATE 0A000)"