From f52a5149205b2bb10aa9dfcbcc031ed37a065946 Mon Sep 17 00:00:00 2001 From: Steven Kabbes Date: Sun, 21 Aug 2022 23:06:08 -0700 Subject: [PATCH] pg-gen: make sqlc-pg-gen the complete source of truth for pg_catalog.go (#1809) --- .../postgresql/go/query.sql.go | 2 +- .../engine/postgresql/contrib/adminpack.go | 15 +- internal/engine/postgresql/contrib/citext.go | 20 +- internal/engine/postgresql/contrib/cube.go | 20 +- internal/engine/postgresql/contrib/dblink.go | 91 +- .../postgresql/contrib/fuzzystrmatch.go | 18 +- internal/engine/postgresql/contrib/hstore.go | 28 +- .../engine/postgresql/contrib/intarray.go | 6 +- internal/engine/postgresql/contrib/isn.go | 644 +-- internal/engine/postgresql/contrib/ltree.go | 51 +- .../engine/postgresql/contrib/pageinspect.go | 230 +- .../postgresql/contrib/pg_freespacemap.go | 10 + .../postgresql/contrib/pg_stat_statements.go | 10 + .../postgresql/contrib/pg_visibility.go | 71 + .../engine/postgresql/contrib/pgcrypto.go | 76 +- .../engine/postgresql/contrib/pgrowlocks.go | 25 + .../engine/postgresql/contrib/pgstattuple.go | 74 +- internal/engine/postgresql/contrib/sslinfo.go | 5 + .../engine/postgresql/contrib/tablefunc.go | 6 +- internal/engine/postgresql/contrib/xml2.go | 24 +- internal/engine/postgresql/extension.go | 2 + internal/engine/postgresql/pg_catalog.go | 3740 ++++++++++++----- internal/tools/sqlc-pg-gen/main.go | 183 +- 23 files changed, 3870 insertions(+), 1481 deletions(-) create mode 100644 internal/engine/postgresql/contrib/pgrowlocks.go diff --git a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go index a181ea7f5a..f95c07a7bc 100644 --- a/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go +++ b/internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go @@ -79,7 +79,7 @@ ORDER BY bucket DESC type ListMetricsRow struct { Bucket interface{} CityName sql.NullString - Avg string + Avg float64 } func (q *Queries) ListMetrics(ctx context.Context) ([]ListMetricsRow, error) { diff --git a/internal/engine/postgresql/contrib/adminpack.go b/internal/engine/postgresql/contrib/adminpack.go index 45cd9a1e38..9364a0dbfc 100644 --- a/internal/engine/postgresql/contrib/adminpack.go +++ b/internal/engine/postgresql/contrib/adminpack.go @@ -19,9 +19,6 @@ func Adminpack() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -34,9 +31,21 @@ func Adminpack() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_file_sync", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "void"}, + }, { Name: "pg_file_unlink", Args: []*catalog.Argument{ diff --git a/internal/engine/postgresql/contrib/citext.go b/internal/engine/postgresql/contrib/citext.go index f0c7519dc7..5a035bdd32 100644 --- a/internal/engine/postgresql/contrib/citext.go +++ b/internal/engine/postgresql/contrib/citext.go @@ -23,7 +23,7 @@ func Citext() *catalog.Schema { Name: "citext", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "inet"}, + Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, @@ -32,7 +32,7 @@ func Citext() *catalog.Schema { Name: "citext", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, @@ -307,9 +307,6 @@ func Citext() *catalog.Schema { { Type: &ast.TypeName{Name: "citext"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -322,6 +319,9 @@ func Citext() *catalog.Schema { { Type: &ast.TypeName{Name: "citext"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -367,9 +367,6 @@ func Citext() *catalog.Schema { { Type: &ast.TypeName{Name: "citext"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -382,6 +379,9 @@ func Citext() *catalog.Schema { { Type: &ast.TypeName{Name: "citext"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -485,7 +485,7 @@ func Citext() *catalog.Schema { Type: &ast.TypeName{Name: "citext"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -497,7 +497,7 @@ func Citext() *catalog.Schema { Type: &ast.TypeName{Name: "citext"}, }, { - Type: &ast.TypeName{Name: "citext"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, diff --git a/internal/engine/postgresql/contrib/cube.go b/internal/engine/postgresql/contrib/cube.go index 687eb93e2c..90373f822a 100644 --- a/internal/engine/postgresql/contrib/cube.go +++ b/internal/engine/postgresql/contrib/cube.go @@ -14,7 +14,7 @@ func Cube() *catalog.Schema { Name: "cube", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "double precision"}, @@ -26,10 +26,13 @@ func Cube() *catalog.Schema { Name: "cube", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision[]"}, + Type: &ast.TypeName{Name: "cube"}, }, { - Type: &ast.TypeName{Name: "double precision[]"}, + Type: &ast.TypeName{Name: "double precision"}, + }, + { + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, @@ -38,7 +41,7 @@ func Cube() *catalog.Schema { Name: "cube", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision[]"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, @@ -46,9 +49,6 @@ func Cube() *catalog.Schema { { Name: "cube", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "cube"}, - }, { Type: &ast.TypeName{Name: "double precision"}, }, @@ -62,7 +62,7 @@ func Cube() *catalog.Schema { Name: "cube", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, @@ -71,10 +71,10 @@ func Cube() *catalog.Schema { Name: "cube", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "cube"}, + Type: &ast.TypeName{Name: "double precision[]"}, }, { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, diff --git a/internal/engine/postgresql/contrib/dblink.go b/internal/engine/postgresql/contrib/dblink.go index c5208cf1e2..be0f2141e5 100644 --- a/internal/engine/postgresql/contrib/dblink.go +++ b/internal/engine/postgresql/contrib/dblink.go @@ -16,12 +16,6 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "record"}, }, @@ -32,7 +26,7 @@ func Dblink() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, @@ -44,7 +38,7 @@ func Dblink() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, @@ -55,6 +49,12 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "record"}, }, @@ -133,9 +133,6 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -145,6 +142,9 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -157,15 +157,15 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_close", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -222,6 +222,11 @@ func Dblink() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "dblink_disconnect", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "dblink_disconnect", Args: []*catalog.Argument{ @@ -231,11 +236,6 @@ func Dblink() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, - { - Name: "dblink_disconnect", - Args: []*catalog.Argument{}, - ReturnType: &ast.TypeName{Name: "text"}, - }, { Name: "dblink_error_message", Args: []*catalog.Argument{ @@ -313,6 +313,15 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "dblink_fetch", + Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, @@ -343,6 +352,9 @@ func Dblink() *catalog.Schema { { Name: "dblink_fetch", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -356,22 +368,25 @@ func Dblink() *catalog.Schema { ReturnType: &ast.TypeName{Name: "record"}, }, { - Name: "dblink_fetch", + Name: "dblink_get_connections", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "text[]"}, + }, + { + Name: "dblink_get_notify", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "dblink_get_notify", Args: []*catalog.Argument{ { + Name: "conname", Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "record"}, }, - { - Name: "dblink_get_connections", - Args: []*catalog.Argument{}, - ReturnType: &ast.TypeName{Name: "text[]"}, - }, { Name: "dblink_get_pkey", Args: []*catalog.Argument{ @@ -387,9 +402,6 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "record"}, }, @@ -399,6 +411,9 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "record"}, }, @@ -420,12 +435,6 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -438,6 +447,9 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -451,7 +463,7 @@ func Dblink() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -468,6 +480,9 @@ func Dblink() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, diff --git a/internal/engine/postgresql/contrib/fuzzystrmatch.go b/internal/engine/postgresql/contrib/fuzzystrmatch.go index b2174ebf03..95002247c0 100644 --- a/internal/engine/postgresql/contrib/fuzzystrmatch.go +++ b/internal/engine/postgresql/contrib/fuzzystrmatch.go @@ -85,15 +85,6 @@ func Fuzzystrmatch() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -109,6 +100,15 @@ func Fuzzystrmatch() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, diff --git a/internal/engine/postgresql/contrib/hstore.go b/internal/engine/postgresql/contrib/hstore.go index a3ad1b27a9..ec289dbb55 100644 --- a/internal/engine/postgresql/contrib/hstore.go +++ b/internal/engine/postgresql/contrib/hstore.go @@ -47,7 +47,7 @@ func Hstore() *catalog.Schema { Type: &ast.TypeName{Name: "hstore"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, @@ -59,7 +59,7 @@ func Hstore() *catalog.Schema { Type: &ast.TypeName{Name: "hstore"}, }, { - Type: &ast.TypeName{Name: "text[]"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, @@ -71,11 +71,21 @@ func Hstore() *catalog.Schema { Type: &ast.TypeName{Name: "hstore"}, }, { - Type: &ast.TypeName{Name: "hstore"}, + Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, + { + Name: "each", + Args: []*catalog.Argument{ + { + Name: "hs", + Type: &ast.TypeName{Name: "hstore"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "exist", Args: []*catalog.Argument{ @@ -191,7 +201,10 @@ func Hstore() *catalog.Schema { Name: "hstore", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text[]"}, + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, @@ -202,9 +215,6 @@ func Hstore() *catalog.Schema { { Type: &ast.TypeName{Name: "text[]"}, }, - { - Type: &ast.TypeName{Name: "text[]"}, - }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, @@ -212,10 +222,10 @@ func Hstore() *catalog.Schema { Name: "hstore", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "text[]"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, diff --git a/internal/engine/postgresql/contrib/intarray.go b/internal/engine/postgresql/contrib/intarray.go index 9fb23b0d28..532886e63b 100644 --- a/internal/engine/postgresql/contrib/intarray.go +++ b/internal/engine/postgresql/contrib/intarray.go @@ -301,9 +301,6 @@ func Intarray() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, @@ -316,6 +313,9 @@ func Intarray() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, diff --git a/internal/engine/postgresql/contrib/isn.go b/internal/engine/postgresql/contrib/isn.go index ab49dc3a3e..dd1ff63dbf 100644 --- a/internal/engine/postgresql/contrib/isn.go +++ b/internal/engine/postgresql/contrib/isn.go @@ -29,7 +29,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -41,7 +41,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -53,7 +53,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -65,7 +65,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -77,7 +77,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -89,7 +89,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -101,7 +101,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -113,7 +113,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -125,7 +125,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -137,7 +137,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -185,7 +185,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -197,7 +197,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -221,7 +221,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -233,7 +233,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -245,7 +245,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -293,7 +293,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -317,7 +317,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -359,7 +359,7 @@ func Isn() *catalog.Schema { Name: "ean13_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -377,7 +377,7 @@ func Isn() *catalog.Schema { Name: "ean13_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -386,7 +386,7 @@ func Isn() *catalog.Schema { Name: "ean13_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -467,7 +467,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -476,7 +476,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -494,7 +494,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -503,7 +503,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -512,7 +512,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -521,7 +521,7 @@ func Isn() *catalog.Schema { Name: "is_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -611,7 +611,7 @@ func Isn() *catalog.Schema { Name: "isn_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -620,7 +620,7 @@ func Isn() *catalog.Schema { Name: "isn_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -629,7 +629,7 @@ func Isn() *catalog.Schema { Name: "isn_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -638,7 +638,7 @@ func Isn() *catalog.Schema { Name: "isn_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -664,7 +664,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -676,7 +676,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -700,7 +700,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -712,7 +712,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -724,7 +724,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -736,7 +736,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -748,7 +748,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -757,10 +757,10 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -769,7 +769,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, @@ -777,6 +777,18 @@ func Isn() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "isneq", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "isbn"}, + }, + { + Type: &ast.TypeName{Name: "isbn13"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "isneq", Args: []*catalog.Argument{ @@ -793,7 +805,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, @@ -805,7 +817,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, @@ -817,7 +829,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -829,10 +841,10 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -841,10 +853,10 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -865,7 +877,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, @@ -877,7 +889,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, @@ -889,7 +901,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -901,10 +913,10 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -913,10 +925,10 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -937,7 +949,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, @@ -949,7 +961,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, @@ -961,7 +973,7 @@ func Isn() *catalog.Schema { Name: "isneq", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -982,10 +994,10 @@ func Isn() *catalog.Schema { ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "isneq", + Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -997,10 +1009,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1012,7 +1024,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1021,7 +1033,7 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, @@ -1036,7 +1048,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1045,10 +1057,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1060,7 +1072,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1069,10 +1081,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1084,7 +1096,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1093,10 +1105,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1105,10 +1117,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1117,10 +1129,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1129,10 +1141,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1144,7 +1156,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1153,7 +1165,7 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1168,7 +1180,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1177,10 +1189,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1189,10 +1201,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1201,10 +1213,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1228,7 +1240,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1237,10 +1249,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1249,10 +1261,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1261,7 +1273,7 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1276,7 +1288,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1285,10 +1297,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1297,10 +1309,10 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1309,22 +1321,22 @@ func Isn() *catalog.Schema { Name: "isnge", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "isnge", + Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1333,10 +1345,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1345,10 +1357,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1357,10 +1369,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1369,10 +1381,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1381,7 +1393,7 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, @@ -1393,10 +1405,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1408,7 +1420,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1417,10 +1429,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1429,10 +1441,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1453,10 +1465,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1465,10 +1477,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1477,10 +1489,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1489,7 +1501,7 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1513,10 +1525,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1525,7 +1537,7 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1537,10 +1549,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1549,10 +1561,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1561,10 +1573,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1573,10 +1585,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1585,10 +1597,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1597,10 +1609,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1609,10 +1621,10 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1636,7 +1648,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1645,16 +1657,16 @@ func Isn() *catalog.Schema { Name: "isngt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "isngt", + Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, @@ -1668,24 +1680,12 @@ func Isn() *catalog.Schema { { Name: "isnle", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "issn13"}, - }, { Type: &ast.TypeName{Name: "ean13"}, }, - }, - ReturnType: &ast.TypeName{Name: "boolean"}, - }, - { - Name: "isnle", - Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, - { - Type: &ast.TypeName{Name: "ean13"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -1693,10 +1693,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1705,7 +1705,7 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, @@ -1717,10 +1717,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1729,10 +1729,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1741,10 +1741,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1756,7 +1756,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1765,7 +1765,7 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1777,10 +1777,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1789,10 +1789,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1801,10 +1801,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1813,10 +1813,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1825,10 +1825,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1837,7 +1837,7 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -1849,10 +1849,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1861,10 +1861,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1873,10 +1873,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1885,10 +1885,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1897,10 +1897,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1908,24 +1908,12 @@ func Isn() *catalog.Schema { { Name: "isnle", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "ean13"}, - }, { Type: &ast.TypeName{Name: "issn"}, }, - }, - ReturnType: &ast.TypeName{Name: "boolean"}, - }, - { - Name: "isnle", - Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, - { - Type: &ast.TypeName{Name: "ismn"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -1933,10 +1921,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1945,7 +1933,7 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, @@ -1957,10 +1945,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1969,10 +1957,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1981,10 +1969,10 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1993,22 +1981,22 @@ func Isn() *catalog.Schema { Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "isnlt", + Name: "isnle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2017,10 +2005,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2032,7 +2020,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2041,10 +2029,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2053,7 +2041,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, @@ -2065,10 +2053,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2077,10 +2065,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2092,7 +2080,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2101,10 +2089,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2113,7 +2101,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -2125,10 +2113,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2137,7 +2125,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, @@ -2149,10 +2137,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2161,10 +2149,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2173,10 +2161,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2185,7 +2173,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -2197,10 +2185,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2209,7 +2197,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, @@ -2221,10 +2209,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2233,10 +2221,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2248,7 +2236,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2257,7 +2245,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -2269,10 +2257,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2281,10 +2269,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2293,10 +2281,10 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2305,7 +2293,7 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, @@ -2329,22 +2317,22 @@ func Isn() *catalog.Schema { Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "isnne", + Name: "isnlt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2353,10 +2341,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2365,10 +2353,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2377,10 +2365,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2392,7 +2380,7 @@ func Isn() *catalog.Schema { Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2401,10 +2389,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2413,10 +2401,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2425,10 +2413,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2437,10 +2425,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2449,10 +2437,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2461,10 +2449,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2473,10 +2461,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "isbn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2485,10 +2473,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "ismn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2497,10 +2485,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2509,10 +2497,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2521,7 +2509,7 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -2533,10 +2521,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2545,10 +2533,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn"}, }, { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2557,10 +2545,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2581,10 +2569,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2592,11 +2580,23 @@ func Isn() *catalog.Schema { { Name: "isnne", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "issn"}, + }, { Type: &ast.TypeName{Name: "ean13"}, }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "isnne", + Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn"}, + }, + { + Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2605,10 +2605,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn"}, }, { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2617,10 +2617,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn13"}, }, { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2629,7 +2629,7 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, @@ -2641,7 +2641,7 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, @@ -2653,7 +2653,7 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, @@ -2665,10 +2665,10 @@ func Isn() *catalog.Schema { Name: "isnne", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "upc"}, }, { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -2713,28 +2713,28 @@ func Isn() *catalog.Schema { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ismn13"}, + Type: &ast.TypeName{Name: "ean13"}, }, }, - ReturnType: &ast.TypeName{Name: "ismn13"}, + ReturnType: &ast.TypeName{Name: "ean13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "ean13"}, + Type: &ast.TypeName{Name: "isbn"}, }, }, - ReturnType: &ast.TypeName{Name: "ean13"}, + ReturnType: &ast.TypeName{Name: "isbn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn"}, + Type: &ast.TypeName{Name: "isbn13"}, }, }, - ReturnType: &ast.TypeName{Name: "isbn"}, + ReturnType: &ast.TypeName{Name: "isbn13"}, }, { Name: "make_valid", @@ -2749,37 +2749,37 @@ func Isn() *catalog.Schema { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn"}, + Type: &ast.TypeName{Name: "ismn13"}, }, }, - ReturnType: &ast.TypeName{Name: "issn"}, + ReturnType: &ast.TypeName{Name: "ismn13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "isbn13"}, + Type: &ast.TypeName{Name: "issn"}, }, }, - ReturnType: &ast.TypeName{Name: "isbn13"}, + ReturnType: &ast.TypeName{Name: "issn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "upc"}, + Type: &ast.TypeName{Name: "issn13"}, }, }, - ReturnType: &ast.TypeName{Name: "upc"}, + ReturnType: &ast.TypeName{Name: "issn13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "issn13"}, + Type: &ast.TypeName{Name: "upc"}, }, }, - ReturnType: &ast.TypeName{Name: "issn13"}, + ReturnType: &ast.TypeName{Name: "upc"}, }, { Name: "upc", diff --git a/internal/engine/postgresql/contrib/ltree.go b/internal/engine/postgresql/contrib/ltree.go index aabc28ae61..ce7839449a 100644 --- a/internal/engine/postgresql/contrib/ltree.go +++ b/internal/engine/postgresql/contrib/ltree.go @@ -187,9 +187,6 @@ func Ltree() *catalog.Schema { { Type: &ast.TypeName{Name: "ltree"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -202,6 +199,9 @@ func Ltree() *catalog.Schema { { Type: &ast.TypeName{Name: "ltree"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -217,15 +217,6 @@ func Ltree() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "ltree"}, }, - { - Name: "lca", - Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "ltree[]"}, - }, - }, - ReturnType: &ast.TypeName{Name: "ltree"}, - }, { Name: "lca", Args: []*catalog.Argument{ @@ -361,6 +352,15 @@ func Ltree() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "ltree"}, }, + { + Name: "lca", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "ltree[]"}, + }, + }, + ReturnType: &ast.TypeName{Name: "ltree"}, + }, { Name: "lquery_in", Args: []*catalog.Argument{ @@ -379,6 +379,15 @@ func Ltree() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "cstring"}, }, + { + Name: "lquery_send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "lquery"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "lt_q_regex", Args: []*catalog.Argument{ @@ -604,6 +613,15 @@ func Ltree() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "ltree_send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "ltree"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "ltree_textadd", Args: []*catalog.Argument{ @@ -658,6 +676,15 @@ func Ltree() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "ltxtq_send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "ltxtquery"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "nlevel", Args: []*catalog.Argument{ diff --git a/internal/engine/postgresql/contrib/pageinspect.go b/internal/engine/postgresql/contrib/pageinspect.go index 61e838e715..af6f1562e7 100644 --- a/internal/engine/postgresql/contrib/pageinspect.go +++ b/internal/engine/postgresql/contrib/pageinspect.go @@ -10,6 +10,30 @@ import ( func Pageinspect() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = []*catalog.Function{ + { + Name: "brin_metapage_info", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "brin_page_items", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Name: "index_oid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "brin_page_type", Args: []*catalog.Argument{ @@ -20,6 +44,64 @@ func Pageinspect() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "brin_revmap_data", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "tid"}, + }, + { + Name: "bt_metap", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "bt_page_items", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "bt_page_items", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "blkno", + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "bt_page_stats", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "blkno", + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "fsm_page_contents", Args: []*catalog.Argument{ @@ -57,6 +139,80 @@ func Pageinspect() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, + { + Name: "gin_leafpage_items", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "gin_metapage_info", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "gin_page_opaque_info", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "hash_bitmap_info", + Args: []*catalog.Argument{ + { + Name: "index_oid", + Type: &ast.TypeName{Name: "regclass"}, + }, + { + Name: "blkno", + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "hash_metapage_info", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "hash_page_items", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "hash_page_stats", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "hash_page_type", Args: []*catalog.Argument{ @@ -67,6 +223,62 @@ func Pageinspect() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "heap_page_item_attrs", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Name: "rel_oid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "heap_page_item_attrs", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Name: "rel_oid", + Type: &ast.TypeName{Name: "regclass"}, + }, + { + Name: "do_detoast", + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "heap_page_items", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "heap_tuple_infomask_flags", + Args: []*catalog.Argument{ + { + Name: "t_infomask", + Type: &ast.TypeName{Name: "integer"}, + }, + { + Name: "t_infomask2", + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "page_checksum", Args: []*catalog.Argument{ @@ -81,6 +293,16 @@ func Pageinspect() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "smallint"}, }, + { + Name: "page_header", + Args: []*catalog.Argument{ + { + Name: "page", + Type: &ast.TypeName{Name: "bytea"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "tuple_data_split", Args: []*catalog.Argument{ @@ -104,10 +326,6 @@ func Pageinspect() *catalog.Schema { Name: "t_bits", Type: &ast.TypeName{Name: "text"}, }, - { - Name: "do_detoast", - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea[]"}, }, @@ -134,6 +352,10 @@ func Pageinspect() *catalog.Schema { Name: "t_bits", Type: &ast.TypeName{Name: "text"}, }, + { + Name: "do_detoast", + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea[]"}, }, diff --git a/internal/engine/postgresql/contrib/pg_freespacemap.go b/internal/engine/postgresql/contrib/pg_freespacemap.go index de72dc8a82..5a7177baaa 100644 --- a/internal/engine/postgresql/contrib/pg_freespacemap.go +++ b/internal/engine/postgresql/contrib/pg_freespacemap.go @@ -10,6 +10,16 @@ import ( func PgFreespacemap() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = []*catalog.Function{ + { + Name: "pg_freespace", + Args: []*catalog.Argument{ + { + Name: "rel", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_freespace", Args: []*catalog.Argument{ diff --git a/internal/engine/postgresql/contrib/pg_stat_statements.go b/internal/engine/postgresql/contrib/pg_stat_statements.go index ad9e56b3cd..222b74ec45 100644 --- a/internal/engine/postgresql/contrib/pg_stat_statements.go +++ b/internal/engine/postgresql/contrib/pg_stat_statements.go @@ -10,6 +10,16 @@ import ( func PgStatStatements() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = []*catalog.Function{ + { + Name: "pg_stat_statements", + Args: []*catalog.Argument{ + { + Name: "showtext", + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_statements_reset", Args: []*catalog.Argument{ diff --git a/internal/engine/postgresql/contrib/pg_visibility.go b/internal/engine/postgresql/contrib/pg_visibility.go index 7a4b0ea179..f5e999ede2 100644 --- a/internal/engine/postgresql/contrib/pg_visibility.go +++ b/internal/engine/postgresql/contrib/pg_visibility.go @@ -10,6 +10,24 @@ import ( func PgVisibility() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = []*catalog.Function{ + { + Name: "pg_check_frozen", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "tid"}, + }, + { + Name: "pg_check_visible", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "tid"}, + }, { Name: "pg_truncate_visibility_map", Args: []*catalog.Argument{ @@ -19,6 +37,59 @@ func PgVisibility() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "void"}, }, + { + Name: "pg_visibility", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_visibility", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + { + Name: "blkno", + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_visibility_map", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_visibility_map", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + { + Name: "blkno", + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_visibility_map_summary", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, } return s } diff --git a/internal/engine/postgresql/contrib/pgcrypto.go b/internal/engine/postgresql/contrib/pgcrypto.go index 5a2468c4e6..21452202f8 100644 --- a/internal/engine/postgresql/contrib/pgcrypto.go +++ b/internal/engine/postgresql/contrib/pgcrypto.go @@ -16,12 +16,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, - { - Type: &ast.TypeName{Name: "text[]"}, - }, - { - Type: &ast.TypeName{Name: "text[]"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -31,6 +25,12 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, + { + Type: &ast.TypeName{Name: "text[]"}, + }, + { + Type: &ast.TypeName{Name: "text[]"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -154,11 +154,6 @@ func Pgcrypto() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, - { - Name: "gen_random_uuid", - Args: []*catalog.Argument{}, - ReturnType: &ast.TypeName{Name: "uuid"}, - }, { Name: "gen_salt", Args: []*catalog.Argument{ @@ -184,10 +179,10 @@ func Pgcrypto() *catalog.Schema { Name: "hmac", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -199,10 +194,10 @@ func Pgcrypto() *catalog.Schema { Name: "hmac", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -210,6 +205,15 @@ func Pgcrypto() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, + { + Name: "pgp_armor_headers", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pgp_key_id", Args: []*catalog.Argument{ @@ -243,9 +247,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -261,6 +262,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -273,12 +277,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -291,6 +289,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -306,6 +307,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -318,9 +322,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -333,6 +334,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -372,9 +376,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -387,6 +388,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -426,9 +430,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -441,6 +442,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -453,9 +457,6 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -468,6 +469,9 @@ func Pgcrypto() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, diff --git a/internal/engine/postgresql/contrib/pgrowlocks.go b/internal/engine/postgresql/contrib/pgrowlocks.go new file mode 100644 index 0000000000..ab34e5ed9b --- /dev/null +++ b/internal/engine/postgresql/contrib/pgrowlocks.go @@ -0,0 +1,25 @@ +// Code generated by sqlc-pg-gen. DO NOT EDIT. + +package contrib + +import ( + "github.com/kyleconroy/sqlc/internal/sql/ast" + "github.com/kyleconroy/sqlc/internal/sql/catalog" +) + +func Pgrowlocks() *catalog.Schema { + s := &catalog.Schema{Name: "pg_catalog"} + s.Funcs = []*catalog.Function{ + { + Name: "pgrowlocks", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + } + return s +} diff --git a/internal/engine/postgresql/contrib/pgstattuple.go b/internal/engine/postgresql/contrib/pgstattuple.go index 2c128f9c38..92631c7797 100644 --- a/internal/engine/postgresql/contrib/pgstattuple.go +++ b/internal/engine/postgresql/contrib/pgstattuple.go @@ -15,7 +15,7 @@ func Pgstattuple() *catalog.Schema { Args: []*catalog.Argument{ { Name: "relname", - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -25,11 +25,81 @@ func Pgstattuple() *catalog.Schema { Args: []*catalog.Argument{ { Name: "relname", - Type: &ast.TypeName{Name: "regclass"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "pgstatginindex", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstathashindex", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstatindex", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstatindex", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstattuple", + Args: []*catalog.Argument{ + { + Name: "reloid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstattuple", + Args: []*catalog.Argument{ + { + Name: "relname", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pgstattuple_approx", + Args: []*catalog.Argument{ + { + Name: "reloid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, } return s } diff --git a/internal/engine/postgresql/contrib/sslinfo.go b/internal/engine/postgresql/contrib/sslinfo.go index e7c23e0199..617b8e4f09 100644 --- a/internal/engine/postgresql/contrib/sslinfo.go +++ b/internal/engine/postgresql/contrib/sslinfo.go @@ -39,6 +39,11 @@ func Sslinfo() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "numeric"}, }, + { + Name: "ssl_extension_info", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "ssl_is_used", Args: []*catalog.Argument{}, diff --git a/internal/engine/postgresql/contrib/tablefunc.go b/internal/engine/postgresql/contrib/tablefunc.go index 1c8af295dd..27a1687452 100644 --- a/internal/engine/postgresql/contrib/tablefunc.go +++ b/internal/engine/postgresql/contrib/tablefunc.go @@ -112,9 +112,6 @@ func Tablefunc() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "record"}, }, @@ -124,6 +121,9 @@ func Tablefunc() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "record"}, }, diff --git a/internal/engine/postgresql/contrib/xml2.go b/internal/engine/postgresql/contrib/xml2.go index 9de8ba30d8..0b251471f6 100644 --- a/internal/engine/postgresql/contrib/xml2.go +++ b/internal/engine/postgresql/contrib/xml2.go @@ -49,9 +49,6 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -64,6 +61,9 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -76,12 +76,6 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -94,6 +88,9 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -109,6 +106,9 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -166,9 +166,6 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -181,6 +178,9 @@ func Xml2() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, diff --git a/internal/engine/postgresql/extension.go b/internal/engine/postgresql/extension.go index 4c5a213395..5a6125aa8f 100644 --- a/internal/engine/postgresql/extension.go +++ b/internal/engine/postgresql/extension.go @@ -51,6 +51,8 @@ func loadExtension(name string) *catalog.Schema { return contrib.PgFreespacemap() case "pg_prewarm": return contrib.PgPrewarm() + case "pgrowlocks": + return contrib.Pgrowlocks() case "pg_stat_statements": return contrib.PgStatStatements() case "pgstattuple": diff --git a/internal/engine/postgresql/pg_catalog.go b/internal/engine/postgresql/pg_catalog.go index f0a5bf92fa..46e3a97efd 100644 --- a/internal/engine/postgresql/pg_catalog.go +++ b/internal/engine/postgresql/pg_catalog.go @@ -74,7 +74,7 @@ func genPGCatalog() *catalog.Schema { Name: "abbrev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "inet"}, + Type: &ast.TypeName{Name: "cidr"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -83,7 +83,7 @@ func genPGCatalog() *catalog.Schema { Name: "abbrev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "cidr"}, + Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -92,28 +92,28 @@ func genPGCatalog() *catalog.Schema { Name: "abs", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "abs", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "abs", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "abs", @@ -128,19 +128,19 @@ func genPGCatalog() *catalog.Schema { Name: "abs", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "abs", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "real"}, + ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "aclcontains", @@ -166,6 +166,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "aclitem[]"}, }, + { + Name: "aclexplode", + Args: []*catalog.Argument{ + { + Name: "acl", + Type: &ast.TypeName{Name: "aclitem[]"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "aclinsert", Args: []*catalog.Argument{ @@ -251,16 +261,16 @@ func genPGCatalog() *catalog.Schema { Name: "age", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "xid"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "age", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, @@ -269,10 +279,10 @@ func genPGCatalog() *catalog.Schema { Name: "age", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, @@ -281,19 +291,19 @@ func genPGCatalog() *catalog.Schema { Name: "age", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "xid"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "age", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, @@ -352,6 +362,93 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, + { + Name: "anycompatible_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "anycompatible"}, + }, + { + Name: "anycompatible_out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anycompatible"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "anycompatiblearray_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, + }, + { + Name: "anycompatiblearray_out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anycompatiblearray"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "anycompatiblearray_send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anycompatiblearray"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, + { + Name: "anycompatiblenonarray_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "anycompatiblenonarray"}, + }, + { + Name: "anycompatiblenonarray_out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anycompatiblenonarray"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "anycompatiblerange_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + { + Type: &ast.TypeName{Name: "oid"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "anycompatiblerange"}, + }, + { + Name: "anycompatiblerange_out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anycompatiblerange"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, { Name: "anyelement_in", Args: []*catalog.Argument{ @@ -446,7 +543,7 @@ func genPGCatalog() *catalog.Schema { Name: "area", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "circle"}, + Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -455,7 +552,7 @@ func genPGCatalog() *catalog.Schema { Name: "area", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "path"}, + Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -464,7 +561,7 @@ func genPGCatalog() *catalog.Schema { Name: "area", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "box"}, + Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -541,9 +638,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer[]"}, }, - { - Type: &ast.TypeName{Name: "integer[]"}, - }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, @@ -556,6 +650,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer[]"}, }, + { + Type: &ast.TypeName{Name: "integer[]"}, + }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, @@ -697,9 +794,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "anyelement"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -712,6 +806,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "anyelement"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -793,9 +890,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "anyarray"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "json"}, }, @@ -805,6 +899,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "anyarray"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "json"}, }, @@ -817,9 +914,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -832,6 +926,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -983,43 +1080,43 @@ func genPGCatalog() *catalog.Schema { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -1028,7 +1125,7 @@ func genPGCatalog() *catalog.Schema { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -1037,10 +1134,10 @@ func genPGCatalog() *catalog.Schema { Name: "avg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "binary_upgrade_create_empty_extension", @@ -1181,25 +1278,25 @@ func genPGCatalog() *catalog.Schema { Name: "bit", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "bit"}, - }, { Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, @@ -1217,10 +1314,10 @@ func genPGCatalog() *catalog.Schema { Name: "bit_and", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bit"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_and", @@ -1235,10 +1332,10 @@ func genPGCatalog() *catalog.Schema { Name: "bit_and", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "bit_in", @@ -1286,37 +1383,37 @@ func genPGCatalog() *catalog.Schema { Name: "bit_or", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bit"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "bit_out", @@ -1523,7 +1620,7 @@ func genPGCatalog() *catalog.Schema { Name: "bool", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1532,7 +1629,7 @@ func genPGCatalog() *catalog.Schema { Name: "bool", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -1694,7 +1791,7 @@ func genPGCatalog() *catalog.Schema { Name: "box", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "polygon"}, + Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, @@ -1724,7 +1821,7 @@ func genPGCatalog() *catalog.Schema { Name: "box", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "circle"}, + Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, @@ -2081,13 +2178,7 @@ func genPGCatalog() *catalog.Schema { Name: "bpchar", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, - }, - { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, @@ -2096,7 +2187,13 @@ func genPGCatalog() *catalog.Schema { Name: "bpchar", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "character"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, @@ -2105,7 +2202,7 @@ func genPGCatalog() *catalog.Schema { Name: "bpchar", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "char"}, + Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, @@ -2503,6 +2600,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "btequalimage", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "btfloat48cmp", Args: []*catalog.Argument{ @@ -2735,13 +2841,13 @@ func genPGCatalog() *catalog.Schema { Name: "btrim", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "btrim", @@ -2756,13 +2862,13 @@ func genPGCatalog() *catalog.Schema { Name: "btrim", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "bytea"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "bttext_pattern_cmp", @@ -2813,10 +2919,19 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "integer"}, }, { - Name: "byteacat", + Name: "btvarstrequalimage", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "byteacat", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, @@ -3281,19 +3396,19 @@ func genPGCatalog() *catalog.Schema { Name: "ceil", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ceil", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "ceiling", @@ -3335,7 +3450,7 @@ func genPGCatalog() *catalog.Schema { Name: "char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "char"}, @@ -3344,7 +3459,7 @@ func genPGCatalog() *catalog.Schema { Name: "char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "char"}, @@ -3572,10 +3687,7 @@ func genPGCatalog() *catalog.Schema { Name: "circle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "point"}, - }, - { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, @@ -3584,7 +3696,10 @@ func genPGCatalog() *catalog.Schema { Name: "circle", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "box"}, + Type: &ast.TypeName{Name: "point"}, + }, + { + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, @@ -4035,6 +4150,19 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "concat_ws", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "convert", Args: []*catalog.Argument{ @@ -4131,6 +4259,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "count", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, { Name: "count", Args: []*catalog.Argument{ @@ -4140,11 +4273,6 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bigint"}, }, - { - Name: "count", - Args: []*catalog.Argument{}, - ReturnType: &ast.TypeName{Name: "bigint"}, - }, { Name: "covar_pop", Args: []*catalog.Argument{ @@ -4201,6 +4329,16 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "cume_dist", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "current_database", Args: []*catalog.Argument{}, @@ -4231,9 +4369,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -4243,6 +4378,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -4390,7 +4528,7 @@ func genPGCatalog() *catalog.Schema { Name: "date", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, @@ -4399,7 +4537,7 @@ func genPGCatalog() *catalog.Schema { Name: "date", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, @@ -4729,7 +4867,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4741,7 +4879,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4753,7 +4891,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4765,7 +4903,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4777,7 +4915,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4789,7 +4927,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -4846,10 +4984,10 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "date_trunc", @@ -4858,10 +4996,10 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, + ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "date_trunc", @@ -4872,9 +5010,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, @@ -4885,10 +5020,13 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "daterange", @@ -4997,6 +5135,16 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "dense_rank", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, { Name: "dexp", Args: []*catalog.Argument{ @@ -5024,6 +5172,42 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "dist_bl", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "box"}, + }, + { + Type: &ast.TypeName{Name: "line"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, + { + Name: "dist_bp", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "box"}, + }, + { + Type: &ast.TypeName{Name: "point"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, + { + Name: "dist_bs", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "box"}, + }, + { + Type: &ast.TypeName{Name: "lseg"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "dist_cpoint", Args: []*catalog.Argument{ @@ -5060,6 +5244,42 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "dist_lp", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "line"}, + }, + { + Type: &ast.TypeName{Name: "point"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, + { + Name: "dist_ls", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "line"}, + }, + { + Type: &ast.TypeName{Name: "lseg"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, + { + Name: "dist_pathp", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "path"}, + }, + { + Type: &ast.TypeName{Name: "point"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "dist_pb", Args: []*catalog.Argument{ @@ -5096,6 +5316,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "dist_polyc", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "polygon"}, + }, + { + Type: &ast.TypeName{Name: "circle"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "dist_polyp", Args: []*catalog.Argument{ @@ -5168,6 +5400,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "dist_sp", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "lseg"}, + }, + { + Type: &ast.TypeName{Name: "point"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "div", Args: []*catalog.Argument{ @@ -5547,7 +5791,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5556,7 +5800,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5565,7 +5809,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5574,7 +5818,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5583,7 +5827,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5592,7 +5836,7 @@ func genPGCatalog() *catalog.Schema { Name: "float4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, @@ -5931,7 +6175,7 @@ func genPGCatalog() *catalog.Schema { Name: "float8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -5940,7 +6184,7 @@ func genPGCatalog() *catalog.Schema { Name: "float8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -5949,7 +6193,7 @@ func genPGCatalog() *catalog.Schema { Name: "float8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -5958,7 +6202,7 @@ func genPGCatalog() *catalog.Schema { Name: "float8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -5976,7 +6220,7 @@ func genPGCatalog() *catalog.Schema { Name: "float8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -6572,6 +6816,19 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "format", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "format_type", Args: []*catalog.Argument{ @@ -6585,11 +6842,20 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "text"}, }, { - Name: "generate_series", + Name: "gcd", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, + }, + { + Type: &ast.TypeName{Name: "bigint"}, }, + }, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, + { + Name: "gcd", + Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, @@ -6600,100 +6866,132 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "integer"}, }, { - Name: "generate_series", + Name: "gcd", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, - }, - { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { - Name: "generate_series", + Name: "gen_random_uuid", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "uuid"}, + }, + { + Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, + }, + ReturnType: &ast.TypeName{Name: "numeric"}, + }, + { + Name: "generate_series", + Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "bigint"}, + }, + { + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, + }, + { + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "integer"}, + }, + { + Name: "generate_series", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "numeric"}, + }, + { + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, + }, + { + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "generate_subscripts", @@ -6704,9 +7002,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -6719,6 +7014,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -6726,7 +7024,7 @@ func genPGCatalog() *catalog.Schema { Name: "get_bit", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, @@ -6738,10 +7036,10 @@ func genPGCatalog() *catalog.Schema { Name: "get_bit", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -6827,6 +7125,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_any_column_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -6855,7 +7156,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -6875,9 +7176,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -6888,7 +7186,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -6911,6 +7209,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_column_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -6930,10 +7231,10 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -6945,11 +7246,14 @@ func genPGCatalog() *catalog.Schema { Name: "has_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "smallint"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -6960,7 +7264,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -6975,7 +7282,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, + }, + { + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "smallint"}, @@ -6990,7 +7300,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -7007,9 +7317,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_column_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "name"}, - }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7032,7 +7339,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7049,9 +7356,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "smallint"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7065,7 +7369,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7080,10 +7384,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_column_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, - }, - { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "smallint"}, @@ -7097,9 +7398,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_column_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "name"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7131,7 +7429,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_database_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7143,10 +7444,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_database_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7158,7 +7459,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_database_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7173,7 +7474,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7184,9 +7485,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_database_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "oid"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7200,7 +7498,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -7214,6 +7512,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7227,7 +7528,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -7242,10 +7543,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, - }, - { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7262,15 +7560,15 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "oid"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7287,7 +7585,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7298,6 +7596,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_function_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7310,6 +7611,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_function_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7328,9 +7632,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -7341,7 +7642,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7353,10 +7654,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_function_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, - }, - { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7368,7 +7666,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_language_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -7383,7 +7681,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_language_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7398,10 +7696,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_language_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7425,10 +7723,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_language_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7455,7 +7753,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7466,6 +7764,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_schema_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7478,6 +7779,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_schema_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7490,9 +7794,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_schema_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "name"}, - }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7521,10 +7822,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_schema_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, - }, - { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7536,7 +7834,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7548,7 +7849,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7580,9 +7884,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, @@ -7590,10 +7891,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7604,9 +7905,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_sequence_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "name"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7649,6 +7947,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_server_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7662,7 +7963,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_server_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7677,7 +7978,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7688,9 +7989,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_server_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "oid"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7704,7 +8002,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_table_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7730,6 +8031,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_table_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7742,9 +8046,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_table_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "name"}, - }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7773,10 +8074,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_table_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, - }, - { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7788,10 +8086,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7802,6 +8100,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7830,10 +8131,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, - }, - { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7845,10 +8143,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7860,7 +8158,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7875,7 +8173,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7886,6 +8184,9 @@ func genPGCatalog() *catalog.Schema { { Name: "has_type_privilege", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -7902,7 +8203,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7913,9 +8214,6 @@ func genPGCatalog() *catalog.Schema { { Name: "has_type_privilege", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "oid"}, - }, { Type: &ast.TypeName{Name: "oid"}, }, @@ -7929,10 +8227,10 @@ func genPGCatalog() *catalog.Schema { Name: "has_type_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -7944,7 +8242,7 @@ func genPGCatalog() *catalog.Schema { Name: "has_type_privilege", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -8403,13 +8701,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8424,10 +8722,10 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -8445,13 +8743,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "double precision"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "double precision"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8472,7 +8770,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8508,13 +8806,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8529,10 +8827,10 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -8550,13 +8848,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8571,13 +8869,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "real"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "real"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8592,13 +8890,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8613,13 +8911,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8634,13 +8932,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "smallint"}, }, { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8655,10 +8953,10 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -8676,13 +8974,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8697,13 +8995,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8718,13 +9016,13 @@ func genPGCatalog() *catalog.Schema { Name: "in_range", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -8906,7 +9204,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -8915,7 +9213,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -8924,7 +9222,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -8933,7 +9231,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -8942,7 +9240,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -8951,7 +9249,7 @@ func genPGCatalog() *catalog.Schema { Name: "int2", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, @@ -9563,7 +9861,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9572,7 +9870,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9581,7 +9879,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9590,7 +9888,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9608,7 +9906,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9617,7 +9915,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9626,7 +9924,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "char"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -9635,7 +9933,7 @@ func genPGCatalog() *catalog.Schema { Name: "int4", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -10162,9 +10460,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "int4range"}, }, @@ -10177,6 +10472,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "int4range"}, }, @@ -10280,7 +10578,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10289,7 +10587,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10298,7 +10596,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10307,7 +10605,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10316,7 +10614,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10334,7 +10632,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -10343,7 +10641,7 @@ func genPGCatalog() *catalog.Schema { Name: "int8", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -11069,7 +11367,10 @@ func genPGCatalog() *catalog.Schema { Name: "interval", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "interval"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, @@ -11078,10 +11379,7 @@ func genPGCatalog() *catalog.Schema { Name: "interval", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, @@ -11428,6 +11726,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "cstring"}, }, + { + Name: "is_normalized", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "isclosed", Args: []*catalog.Argument{ @@ -11450,7 +11760,7 @@ func genPGCatalog() *catalog.Schema { Name: "isfinite", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11459,7 +11769,7 @@ func genPGCatalog() *catalog.Schema { Name: "isfinite", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11477,7 +11787,7 @@ func genPGCatalog() *catalog.Schema { Name: "isfinite", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11525,10 +11835,10 @@ func genPGCatalog() *catalog.Schema { Name: "isparallel", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "lseg"}, + Type: &ast.TypeName{Name: "line"}, }, { - Type: &ast.TypeName{Name: "lseg"}, + Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11537,10 +11847,10 @@ func genPGCatalog() *catalog.Schema { Name: "isparallel", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "line"}, + Type: &ast.TypeName{Name: "lseg"}, }, { - Type: &ast.TypeName{Name: "line"}, + Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11573,10 +11883,7 @@ func genPGCatalog() *catalog.Schema { Name: "isvertical", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "point"}, - }, - { - Type: &ast.TypeName{Name: "point"}, + Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11594,7 +11901,10 @@ func genPGCatalog() *catalog.Schema { Name: "isvertical", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "line"}, + Type: &ast.TypeName{Name: "point"}, + }, + { + Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -11636,6 +11946,26 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "json_array_elements", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, + }, + }, + ReturnType: &ast.TypeName{Name: "json"}, + }, + { + Name: "json_array_elements_text", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "json_array_length", Args: []*catalog.Argument{ @@ -11645,6 +11975,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "json_build_array", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "json"}, + }, { Name: "json_build_array", Args: []*catalog.Argument{ @@ -11655,6 +11990,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "json"}, }, + { + Name: "json_build_object", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "json"}, + }, { Name: "json_build_object", Args: []*catalog.Argument{ @@ -11666,22 +12006,72 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "json"}, }, { - Name: "json_in", + Name: "json_each", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "cstring"}, + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, }, }, - ReturnType: &ast.TypeName{Name: "json"}, + ReturnType: &ast.TypeName{Name: "record"}, }, { - Name: "json_object", + Name: "json_each_text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text[]"}, + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, }, }, - ReturnType: &ast.TypeName{Name: "json"}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "json_extract_path", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, + }, + { + Name: "path_elems", + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "json"}, + }, + { + Name: "json_extract_path_text", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "json"}, + }, + { + Name: "path_elems", + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "json_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "json"}, + }, + { + Name: "json_object", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text[]"}, + }, + }, + ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object", @@ -11830,9 +12220,6 @@ func genPGCatalog() *catalog.Schema { { Name: "json_to_tsvector", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "regconfig"}, - }, { Type: &ast.TypeName{Name: "json"}, }, @@ -11845,6 +12232,9 @@ func genPGCatalog() *catalog.Schema { { Name: "json_to_tsvector", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regconfig"}, + }, { Type: &ast.TypeName{Name: "json"}, }, @@ -11900,6 +12290,26 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "jsonb_array_elements", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "jsonb_array_elements_text", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "jsonb_array_length", Args: []*catalog.Argument{ @@ -11909,6 +12319,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "jsonb_build_array", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, { Name: "jsonb_build_array", Args: []*catalog.Argument{ @@ -11919,6 +12334,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, + { + Name: "jsonb_build_object", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, { Name: "jsonb_build_object", Args: []*catalog.Argument{ @@ -12001,6 +12421,21 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, + { + Name: "jsonb_delete", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path_elems", + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, { Name: "jsonb_delete_path", Args: []*catalog.Argument{ @@ -12013,6 +12448,26 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, + { + Name: "jsonb_each", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "jsonb_each_text", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "jsonb_eq", Args: []*catalog.Argument{ @@ -12061,6 +12516,36 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "jsonb_extract_path", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path_elems", + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "jsonb_extract_path_text", + Args: []*catalog.Argument{ + { + Name: "from_json", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path_elems", + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "jsonb_ge", Args: []*catalog.Argument{ @@ -12180,9 +12665,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text[]"}, }, - { - Type: &ast.TypeName{Name: "text[]"}, - }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, @@ -12192,6 +12674,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text[]"}, }, + { + Type: &ast.TypeName{Name: "text[]"}, + }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, @@ -12289,6 +12774,30 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "jsonb_path_exists_tz", + Args: []*catalog.Argument{ + { + Name: "target", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "jsonpath"}, + }, + { + Name: "vars", + HasDefault: true, + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "silent", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "jsonb_path_match", Args: []*catalog.Argument{ @@ -12325,6 +12834,30 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "jsonb_path_match_tz", + Args: []*catalog.Argument{ + { + Name: "target", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "jsonpath"}, + }, + { + Name: "vars", + HasDefault: true, + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "silent", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "jsonb_path_query", Args: []*catalog.Argument{ @@ -12373,6 +12906,30 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, + { + Name: "jsonb_path_query_array_tz", + Args: []*catalog.Argument{ + { + Name: "target", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "jsonpath"}, + }, + { + Name: "vars", + HasDefault: true, + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "silent", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, { Name: "jsonb_path_query_first", Args: []*catalog.Argument{ @@ -12397,6 +12954,54 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, + { + Name: "jsonb_path_query_first_tz", + Args: []*catalog.Argument{ + { + Name: "target", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "jsonpath"}, + }, + { + Name: "vars", + HasDefault: true, + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "silent", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "jsonb_path_query_tz", + Args: []*catalog.Argument{ + { + Name: "target", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "jsonpath"}, + }, + { + Name: "vars", + HasDefault: true, + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "silent", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, { Name: "jsonb_populate_record", Args: []*catalog.Argument{ @@ -12463,7 +13068,35 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "jsonb"}, }, { - Name: "jsonb_strip_nulls", + Name: "jsonb_set_lax", + Args: []*catalog.Argument{ + { + Name: "jsonb_in", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "path", + Type: &ast.TypeName{Name: "text[]"}, + }, + { + Name: "replacement", + Type: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "create_if_missing", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "null_value_treatment", + HasDefault: true, + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "jsonb"}, + }, + { + Name: "jsonb_strip_nulls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, @@ -12492,9 +13125,6 @@ func genPGCatalog() *catalog.Schema { { Name: "jsonb_to_tsvector", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "regconfig"}, - }, { Type: &ast.TypeName{Name: "jsonb"}, }, @@ -12507,6 +13137,9 @@ func genPGCatalog() *catalog.Schema { { Name: "jsonb_to_tsvector", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regconfig"}, + }, { Type: &ast.TypeName{Name: "jsonb"}, }, @@ -12647,6 +13280,42 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "lcm", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "bigint"}, + }, + { + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, + { + Name: "lcm", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "integer"}, + }, + { + Name: "lcm", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "numeric"}, + }, + { + Type: &ast.TypeName{Name: "numeric"}, + }, + }, + ReturnType: &ast.TypeName{Name: "numeric"}, + }, { Name: "lead", Args: []*catalog.Argument{ @@ -12665,9 +13334,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "anyelement"}, - }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, @@ -12680,6 +13346,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "anyelement"}, + }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, @@ -12699,10 +13368,10 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "lseg"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "length", @@ -12717,10 +13386,10 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "lseg"}, + Type: &ast.TypeName{Name: "bit"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", @@ -12728,9 +13397,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "bytea"}, }, - { - Type: &ast.TypeName{Name: "name"}, - }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, @@ -12738,7 +13404,10 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "tsvector"}, + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -12747,7 +13416,7 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -12756,7 +13425,7 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -12765,7 +13434,7 @@ func genPGCatalog() *catalog.Schema { Name: "length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -12774,10 +13443,10 @@ func genPGCatalog() *catalog.Schema { Name: "like", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -12786,10 +13455,10 @@ func genPGCatalog() *catalog.Schema { Name: "like", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -12798,7 +13467,7 @@ func genPGCatalog() *catalog.Schema { Name: "like", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -13058,9 +13727,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "oid"}, - }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, @@ -13070,6 +13736,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "oid"}, + }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, @@ -13185,22 +13854,19 @@ func genPGCatalog() *catalog.Schema { Name: "log", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, - }, - { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "log", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "log", @@ -13208,6 +13874,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "numeric"}, }, + { + Type: &ast.TypeName{Name: "numeric"}, + }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, @@ -13215,19 +13884,19 @@ func genPGCatalog() *catalog.Schema { Name: "log10", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "log10", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "loread", @@ -13320,10 +13989,7 @@ func genPGCatalog() *catalog.Schema { Name: "lseg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "point"}, - }, - { - Type: &ast.TypeName{Name: "point"}, + Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, @@ -13332,7 +13998,10 @@ func genPGCatalog() *catalog.Schema { Name: "lseg", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "box"}, + Type: &ast.TypeName{Name: "point"}, + }, + { + Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, @@ -13538,9 +14207,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -13550,6 +14216,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -14002,10 +14671,6 @@ func genPGCatalog() *catalog.Schema { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, - { - Name: "timezone", - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, @@ -14036,6 +14701,10 @@ func genPGCatalog() *catalog.Schema { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, + { + Name: "timezone", + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, @@ -14070,127 +14739,136 @@ func genPGCatalog() *catalog.Schema { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "anyarray"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, + ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "inet"}, + Type: &ast.TypeName{Name: "anyenum"}, }, }, - ReturnType: &ast.TypeName{Name: "inet"}, + ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "anyenum"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "anyenum"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "character"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "date"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "oid"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "inet"}, }, }, - ReturnType: &ast.TypeName{Name: "real"}, + ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "date"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "money"}, }, }, - ReturnType: &ast.TypeName{Name: "time without time zone"}, + ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "time with time zone"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "money"}, + Type: &ast.TypeName{Name: "oid"}, }, }, - ReturnType: &ast.TypeName{Name: "money"}, + ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "pg_lsn"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, + ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "real"}, + }, + { + Name: "max", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "smallint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "max", @@ -14205,46 +14883,46 @@ func genPGCatalog() *catalog.Schema { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "tid"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "anyarray"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "anyarray"}, + ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "character"}, + ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "tid"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "tid"}, + ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "md5", @@ -14268,118 +14946,118 @@ func genPGCatalog() *catalog.Schema { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "anyarray"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, + ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "anyenum"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "character"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "character"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "date"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "oid"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "inet"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "time without time zone"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "time with time zone"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "inet"}, + Type: &ast.TypeName{Name: "money"}, }, }, - ReturnType: &ast.TypeName{Name: "inet"}, + ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "money"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "money"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "oid"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "pg_lsn"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, + ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "min", @@ -14394,64 +15072,70 @@ func genPGCatalog() *catalog.Schema { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "anyarray"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "anyarray"}, + ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "anyenum"}, + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "anyenum"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "tid"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "integer"}, + ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "tid"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "tid"}, + ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "date"}, + ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { - Name: "mod", + Name: "min", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, + }, + ReturnType: &ast.TypeName{Name: "time with time zone"}, + }, + { + Name: "min_scale", + Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -14472,13 +15156,13 @@ func genPGCatalog() *catalog.Schema { Name: "mod", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "integer"}, }, { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "smallint"}, + ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "mod", @@ -14492,6 +15176,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "numeric"}, }, + { + Name: "mod", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "smallint"}, + }, + { + Type: &ast.TypeName{Name: "smallint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "smallint"}, + }, { Name: "mode", Args: []*catalog.Argument{}, @@ -14510,7 +15206,7 @@ func genPGCatalog() *catalog.Schema { Name: "money", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, @@ -14519,7 +15215,7 @@ func genPGCatalog() *catalog.Schema { Name: "money", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, @@ -14549,7 +15245,7 @@ func genPGCatalog() *catalog.Schema { Name: "name", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character varying"}, + Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, @@ -14558,7 +15254,7 @@ func genPGCatalog() *catalog.Schema { Name: "name", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "character varying"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, @@ -14567,7 +15263,7 @@ func genPGCatalog() *catalog.Schema { Name: "name", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, @@ -15047,7 +15743,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "bigint"}, }, { - Name: "notlike", + Name: "normalize", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, @@ -15056,6 +15752,18 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "notlike", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Type: &ast.TypeName{Name: "bytea"}, + }, + }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { @@ -15074,10 +15782,10 @@ func genPGCatalog() *catalog.Schema { Name: "notlike", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -15126,11 +15834,31 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "num_nonnulls", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "integer"}, + }, + { + Name: "num_nulls", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "integer"}, + }, { Name: "numeric", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -15147,9 +15875,6 @@ func genPGCatalog() *catalog.Schema { { Name: "numeric", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "numeric"}, - }, { Type: &ast.TypeName{Name: "integer"}, }, @@ -15160,7 +15885,7 @@ func genPGCatalog() *catalog.Schema { Name: "numeric", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -15178,7 +15903,10 @@ func genPGCatalog() *catalog.Schema { Name: "numeric", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "numeric"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -15187,7 +15915,7 @@ func genPGCatalog() *catalog.Schema { Name: "numeric", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -15196,7 +15924,7 @@ func genPGCatalog() *catalog.Schema { Name: "numeric", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -15546,9 +16274,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "numeric"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "numrange"}, }, @@ -15561,6 +16286,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "numeric"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "numrange"}, }, @@ -15582,9 +16310,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, - { - Type: &ast.TypeName{Name: "name"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -15594,6 +16319,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, + { + Type: &ast.TypeName{Name: "name"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -15610,7 +16338,7 @@ func genPGCatalog() *catalog.Schema { Name: "octet_length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -15628,7 +16356,7 @@ func genPGCatalog() *catalog.Schema { Name: "octet_length", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -15945,35 +16673,17 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, - { - Name: "opaque_in", - Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "cstring"}, - }, - }, - ReturnType: &ast.TypeName{Name: "opaque"}, - }, - { - Name: "opaque_out", - Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "opaque"}, - }, - }, - ReturnType: &ast.TypeName{Name: "cstring"}, - }, { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -15985,16 +16695,16 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16003,13 +16713,13 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -16024,7 +16734,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, @@ -16039,13 +16749,13 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, @@ -16057,16 +16767,16 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16075,16 +16785,16 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16102,7 +16812,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16111,16 +16821,16 @@ func genPGCatalog() *catalog.Schema { Name: "overlaps", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16132,7 +16842,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "time without time zone"}, }, { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, @@ -16168,7 +16878,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "time without time zone"}, }, { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, @@ -16201,28 +16911,25 @@ func genPGCatalog() *catalog.Schema { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bit"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "bit"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, @@ -16231,70 +16938,73 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "bytea"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, - }, - { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "overlay", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "bytea"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "parse_ident", @@ -16544,6 +17254,25 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "percent_rank", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, + { + Name: "percentile_cont", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "double precision"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "percentile_cont", Args: []*catalog.Argument{ @@ -16560,16 +17289,16 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { - Name: "percentile_disc", + Name: "percentile_cont", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "double precision[]"}, }, }, - ReturnType: &ast.TypeName{Name: "anyelement"}, + ReturnType: &ast.TypeName{Name: "interval[]"}, }, { Name: "percentile_disc", @@ -16581,13 +17310,19 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "anyarray"}, }, { - Name: "pg_advisory_lock", + Name: "percentile_disc", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "double precision"}, }, + }, + ReturnType: &ast.TypeName{Name: "anyelement"}, + }, + { + Name: "pg_advisory_lock", + Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, @@ -16596,7 +17331,10 @@ func genPGCatalog() *catalog.Schema { Name: "pg_advisory_lock", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, @@ -16626,10 +17364,7 @@ func genPGCatalog() *catalog.Schema { Name: "pg_advisory_unlock", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16638,7 +17373,10 @@ func genPGCatalog() *catalog.Schema { Name: "pg_advisory_unlock", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, @@ -16669,6 +17407,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_advisory_xact_lock", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "void"}, + }, { Name: "pg_advisory_xact_lock", Args: []*catalog.Argument{ @@ -16682,7 +17429,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "void"}, }, { - Name: "pg_advisory_xact_lock", + Name: "pg_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, @@ -16703,13 +17450,14 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "void"}, }, { - Name: "pg_advisory_xact_lock_shared", - Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "bigint"}, - }, - }, - ReturnType: &ast.TypeName{Name: "void"}, + Name: "pg_available_extension_versions", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_available_extensions", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_backend_pid", @@ -16809,6 +17557,31 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, + { + Name: "pg_config", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_control_checkpoint", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_control_init", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_control_recovery", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_control_system", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_conversion_is_visible", Args: []*catalog.Argument{ @@ -16818,6 +17591,131 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_copy_logical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "src_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "dst_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_copy_logical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "src_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "dst_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "temporary", + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_copy_logical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "src_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "dst_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "temporary", + Type: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "plugin", + Type: &ast.TypeName{Name: "name"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_copy_physical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "src_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "dst_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_copy_physical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "src_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "dst_slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "temporary", + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_create_logical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "plugin", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "temporary", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_create_physical_replication_slot", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "immediately_reserve", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "temporary", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_create_restore_point", Args: []*catalog.Argument{ @@ -16827,6 +17725,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, + { + Name: "pg_current_logfile", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "pg_current_logfile", Args: []*catalog.Argument{ @@ -16837,9 +17740,9 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "text"}, }, { - Name: "pg_current_logfile", + Name: "pg_current_snapshot", Args: []*catalog.Argument{}, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "pg_snapshot"}, }, { Name: "pg_current_wal_flush_lsn", @@ -16856,6 +17759,21 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, + { + Name: "pg_current_xact_id", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, + { + Name: "pg_current_xact_id_if_assigned", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, + { + Name: "pg_cursor", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_database_size", Args: []*catalog.Argument{ @@ -16970,6 +17888,21 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "name"}, }, + { + Name: "pg_event_trigger_ddl_commands", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_event_trigger_dropped_objects", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_event_trigger_table_rewrite_oid", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "oid"}, + }, { Name: "pg_event_trigger_table_rewrite_reason", Args: []*catalog.Argument{}, @@ -16993,11 +17926,18 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "void"}, }, { - Name: "pg_file_rename", + Name: "pg_extension_update_paths", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Name: "name", + Type: &ast.TypeName{Name: "name"}, }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_file_rename", + Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, @@ -17016,9 +17956,21 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_file_sync", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "void"}, + }, { Name: "pg_file_unlink", Args: []*catalog.Argument{ @@ -17094,9 +18046,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -17109,6 +18058,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -17160,6 +18112,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "pg_get_indexdef", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "pg_get_indexdef", Args: []*catalog.Argument{ @@ -17176,13 +18137,37 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "text"}, }, { - Name: "pg_get_indexdef", + Name: "pg_get_keywords", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_get_multixact_members", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Name: "multixid", + Type: &ast.TypeName{Name: "xid"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_get_object_address", + Args: []*catalog.Argument{ + { + Name: "type", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "object_names", + Type: &ast.TypeName{Name: "text[]"}, + }, + { + Name: "object_args", + Type: &ast.TypeName{Name: "text[]"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_partition_constraintdef", @@ -17202,6 +18187,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "pg_get_publication_tables", + Args: []*catalog.Argument{ + { + Name: "pubname", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "oid"}, + }, { Name: "pg_get_replica_identity_index", Args: []*catalog.Argument{ @@ -17211,15 +18206,17 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "regclass"}, }, + { + Name: "pg_get_replication_slots", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_get_ruledef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -17229,6 +18226,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -17244,6 +18244,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "pg_get_shmem_allocations", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_get_statisticsobjdef", Args: []*catalog.Argument{ @@ -17287,7 +18292,16 @@ func genPGCatalog() *catalog.Schema { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "pg_get_viewdef", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, @@ -17301,6 +18315,27 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "oid"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "pg_get_viewdef", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "pg_get_viewdef", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, { Type: &ast.TypeName{Name: "boolean"}, }, @@ -17308,34 +18343,34 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "text"}, }, { - Name: "pg_get_viewdef", + Name: "pg_has_role", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "name"}, + }, + { + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "pg_get_viewdef", + Name: "pg_has_role", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "name"}, + }, { Type: &ast.TypeName{Name: "oid"}, }, - }, - ReturnType: &ast.TypeName{Name: "text"}, - }, - { - Name: "pg_get_viewdef", - Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", @@ -17368,7 +18403,7 @@ func genPGCatalog() *catalog.Schema { Name: "pg_has_role", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, @@ -17383,10 +18418,7 @@ func genPGCatalog() *catalog.Schema { Name: "pg_has_role", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, - }, - { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -17395,31 +18427,45 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "pg_has_role", + Name: "pg_hba_file_rules", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_identify_object", Args: []*catalog.Argument{ { + Name: "classid", Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "text"}, + Name: "objid", + Type: &ast.TypeName{Name: "oid"}, + }, + { + Name: "objsubid", + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "boolean"}, + ReturnType: &ast.TypeName{Name: "record"}, }, { - Name: "pg_has_role", + Name: "pg_identify_object_as_address", Args: []*catalog.Argument{ { + Name: "classid", Type: &ast.TypeName{Name: "oid"}, }, { + Name: "objid", Type: &ast.TypeName{Name: "oid"}, }, { - Type: &ast.TypeName{Name: "text"}, + Name: "objsubid", + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "boolean"}, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_import_system_collations", @@ -17531,6 +18577,11 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_last_committed_xact", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_last_wal_receive_lsn", Args: []*catalog.Argument{}, @@ -17551,6 +18602,11 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "pg_lock_status", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_logdir_ls", Args: []*catalog.Argument{}, @@ -17566,7 +18622,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, @@ -17581,11 +18637,121 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, + { + Name: "pg_logical_slot_get_binary_changes", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "upto_lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Name: "upto_nchanges", + Type: &ast.TypeName{Name: "integer"}, + }, + { + Name: "options", + HasDefault: true, + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_logical_slot_get_changes", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "upto_lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Name: "upto_nchanges", + Type: &ast.TypeName{Name: "integer"}, + }, + { + Name: "options", + HasDefault: true, + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_logical_slot_peek_binary_changes", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "upto_lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Name: "upto_nchanges", + Type: &ast.TypeName{Name: "integer"}, + }, + { + Name: "options", + HasDefault: true, + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_logical_slot_peek_changes", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "upto_lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Name: "upto_nchanges", + Type: &ast.TypeName{Name: "integer"}, + }, + { + Name: "options", + HasDefault: true, + Type: &ast.TypeName{Name: "text[]"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_ls_archive_statusdir", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_ls_dir", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "pg_ls_dir", Args: []*catalog.Argument{ @@ -17602,13 +18768,29 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "text"}, }, { - Name: "pg_ls_dir", + Name: "pg_ls_logdir", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_ls_tmpdir", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_ls_tmpdir", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Name: "tablespace", + Type: &ast.TypeName{Name: "oid"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_ls_waldir", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_lsn_cmp", @@ -17688,6 +18870,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, + { + Name: "pg_lsn_larger", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + }, + ReturnType: &ast.TypeName{Name: "pg_lsn"}, + }, { Name: "pg_lsn_le", Args: []*catalog.Argument{ @@ -17754,6 +18948,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, + { + Name: "pg_lsn_smaller", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + { + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + }, + ReturnType: &ast.TypeName{Name: "pg_lsn"}, + }, { Name: "pg_mcv_list_in", Args: []*catalog.Argument{ @@ -17763,6 +18969,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "pg_mcv_list"}, }, + { + Name: "pg_mcv_list_items", + Args: []*catalog.Argument{ + { + Name: "mcv_list", + Type: &ast.TypeName{Name: "pg_mcv_list"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_mcv_list_out", Args: []*catalog.Argument{ @@ -17899,6 +19115,26 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_options_to_table", + Args: []*catalog.Argument{ + { + Name: "options_array", + Type: &ast.TypeName{Name: "text[]"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_partition_ancestors", + Args: []*catalog.Argument{ + { + Name: "partitionid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "regclass"}, + }, { Name: "pg_partition_root", Args: []*catalog.Argument{ @@ -17908,11 +19144,31 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "regclass"}, }, + { + Name: "pg_partition_tree", + Args: []*catalog.Argument{ + { + Name: "rootrelid", + Type: &ast.TypeName{Name: "regclass"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_postmaster_start_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, + { + Name: "pg_prepared_statement", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_prepared_xact", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_promote", Args: []*catalog.Argument{ @@ -17929,6 +19185,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_read_binary_file", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "pg_read_binary_file", Args: []*catalog.Argument{ @@ -17963,13 +19228,13 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "bytea"}, }, { - Name: "pg_read_binary_file", + Name: "pg_read_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "bytea"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_read_file", @@ -17983,9 +19248,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "bigint"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -18001,14 +19263,8 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "bigint"}, }, - }, - ReturnType: &ast.TypeName{Name: "text"}, - }, - { - Name: "pg_read_file", - Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -18189,6 +19445,20 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "void"}, }, + { + Name: "pg_replication_slot_advance", + Args: []*catalog.Argument{ + { + Name: "slot_name", + Type: &ast.TypeName{Name: "name"}, + }, + { + Name: "upto_lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_rotate_logfile", Args: []*catalog.Argument{}, @@ -18217,6 +19487,31 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "pg_sequence_parameters", + Args: []*catalog.Argument{ + { + Name: "sequence_oid", + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_show_all_file_settings", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_show_all_settings", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_show_replication_origin_status", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_size_bytes", Args: []*catalog.Argument{ @@ -18271,6 +19566,60 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "void"}, }, + { + Name: "pg_snapshot_in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "pg_snapshot"}, + }, + { + Name: "pg_snapshot_out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "pg_snapshot_send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, + { + Name: "pg_snapshot_xip", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, + { + Name: "pg_snapshot_xmax", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, + { + Name: "pg_snapshot_xmin", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, { Name: "pg_start_backup", Args: []*catalog.Argument{ @@ -18296,6 +19645,40 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, + { + Name: "pg_stat_file", + Args: []*catalog.Argument{ + { + Name: "filename", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_stat_file", + Args: []*catalog.Argument{ + { + Name: "filename", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "missing_ok", + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_stat_get_activity", + Args: []*catalog.Argument{ + { + Name: "pid", + Type: &ast.TypeName{Name: "integer"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_get_analyze_count", Args: []*catalog.Argument{ @@ -18305,6 +19688,11 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "pg_stat_get_archiver", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_get_autoanalyze_count", Args: []*catalog.Argument{ @@ -18752,6 +20140,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "pg_stat_get_ins_since_vacuum", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, { Name: "pg_stat_get_last_analyze_time", Args: []*catalog.Argument{ @@ -18815,11 +20212,36 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "pg_stat_get_progress_info", + Args: []*catalog.Argument{ + { + Name: "cmdtype", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_stat_get_slru", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_get_snapshot_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, + { + Name: "pg_stat_get_subscription", + Args: []*catalog.Argument{ + { + Name: "subid", + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_get_tuples_deleted", Args: []*catalog.Argument{ @@ -18883,6 +20305,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bigint"}, }, + { + Name: "pg_stat_get_wal_receiver", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_stat_get_wal_senders", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_stat_get_xact_blocks_fetched", Args: []*catalog.Argument{ @@ -19023,6 +20455,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "void"}, }, + { + Name: "pg_stat_reset_slru", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "void"}, + }, { Name: "pg_statistics_obj_is_visible", Args: []*catalog.Argument{ @@ -19037,6 +20478,21 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, + { + Name: "pg_stop_backup", + Args: []*catalog.Argument{ + { + Name: "exclusive", + Type: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "wait_for_archive", + HasDefault: true, + Type: &ast.TypeName{Name: "boolean"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_switch_wal", Args: []*catalog.Argument{}, @@ -19082,7 +20538,7 @@ func genPGCatalog() *catalog.Schema { Name: "pg_tablespace_size", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "oid"}, + Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -19091,7 +20547,7 @@ func genPGCatalog() *catalog.Schema { Name: "pg_tablespace_size", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, @@ -19105,6 +20561,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "pg_timezone_abbrevs", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "pg_timezone_names", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_total_relation_size", Args: []*catalog.Argument{ @@ -19119,6 +20585,15 @@ func genPGCatalog() *catalog.Schema { Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "pg_try_advisory_lock", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "bigint"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "pg_try_advisory_lock", Args: []*catalog.Argument{ @@ -19132,7 +20607,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "pg_try_advisory_lock", + Name: "pg_try_advisory_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, @@ -19153,7 +20628,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "pg_try_advisory_lock_shared", + Name: "pg_try_advisory_xact_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, @@ -19174,7 +20649,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "boolean"}, }, { - Name: "pg_try_advisory_xact_lock", + Name: "pg_try_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, @@ -19194,15 +20669,6 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, - { - Name: "pg_try_advisory_xact_lock_shared", - Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "bigint"}, - }, - }, - ReturnType: &ast.TypeName{Name: "boolean"}, - }, { Name: "pg_ts_config_is_visible", Args: []*catalog.Argument{ @@ -19257,6 +20723,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "regtype"}, }, + { + Name: "pg_visible_in_snapshot", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "pg_snapshot"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "pg_wal_lsn_diff", Args: []*catalog.Argument{ @@ -19288,6 +20766,16 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "pg_walfile_name_offset", + Args: []*catalog.Argument{ + { + Name: "lsn", + Type: &ast.TypeName{Name: "pg_lsn"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "pg_xact_commit_timestamp", Args: []*catalog.Argument{ @@ -19297,6 +20785,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, + { + Name: "pg_xact_status", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "phraseto_tsquery", Args: []*catalog.Argument{ @@ -19362,7 +20859,7 @@ func genPGCatalog() *catalog.Schema { Name: "point", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "circle"}, + Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, @@ -19371,7 +20868,7 @@ func genPGCatalog() *catalog.Schema { Name: "point", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "path"}, + Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, @@ -19392,7 +20889,7 @@ func genPGCatalog() *catalog.Schema { Name: "point", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "box"}, + Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, @@ -19401,7 +20898,7 @@ func genPGCatalog() *catalog.Schema { Name: "point", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "lseg"}, + Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, @@ -19815,7 +21312,7 @@ func genPGCatalog() *catalog.Schema { Name: "polygon", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "path"}, + Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, @@ -19845,7 +21342,7 @@ func genPGCatalog() *catalog.Schema { Name: "polygon", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "box"}, + Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, @@ -19863,10 +21360,10 @@ func genPGCatalog() *catalog.Schema { Name: "position", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "bit"}, }, { - Type: &ast.TypeName{Name: "bytea"}, + Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -19875,10 +21372,10 @@ func genPGCatalog() *catalog.Schema { Name: "position", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -19887,10 +21384,10 @@ func genPGCatalog() *catalog.Schema { Name: "position", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, @@ -19911,25 +21408,25 @@ func genPGCatalog() *catalog.Schema { Name: "pow", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pow", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "power", @@ -20393,11 +21890,21 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "anyrange"}, }, }, - ReturnType: &ast.TypeName{Name: "anyrange"}, - }, - { - Name: "rank", - Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "anyrange"}, + }, + { + Name: "rank", + Args: []*catalog.Argument{}, + ReturnType: &ast.TypeName{Name: "bigint"}, + }, + { + Name: "rank", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { @@ -20613,6 +22120,33 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "bytea"}, }, + { + Name: "regcollationin", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "regcollation"}, + }, + { + Name: "regcollationout", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regcollation"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "regcollationsend", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regcollation"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "regconfigin", Args: []*catalog.Argument{ @@ -20676,9 +22210,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -20691,6 +22222,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -20703,9 +22237,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -20718,6 +22249,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, @@ -20790,9 +22324,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -20805,6 +22336,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -21157,13 +22691,10 @@ func genPGCatalog() *catalog.Schema { Name: "round", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "round", @@ -21178,10 +22709,13 @@ func genPGCatalog() *catalog.Schema { Name: "round", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "row_number", @@ -21212,9 +22746,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "record"}, }, - { - Type: &ast.TypeName{Name: "boolean"}, - }, }, ReturnType: &ast.TypeName{Name: "json"}, }, @@ -21224,6 +22755,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "record"}, }, + { + Type: &ast.TypeName{Name: "boolean"}, + }, }, ReturnType: &ast.TypeName{Name: "json"}, }, @@ -21260,9 +22794,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -21272,9 +22803,31 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "satisfies_hash_partition", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "oid"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "any"}, + Mode: ast.FuncParamVariadic, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, { Name: "scale", Args: []*catalog.Argument{ @@ -21377,7 +22930,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "bytea"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, @@ -21484,9 +23037,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "char"}, }, - { - Type: &ast.TypeName{Name: "text[]"}, - }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, @@ -21499,6 +23049,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "char"}, }, + { + Type: &ast.TypeName{Name: "text[]"}, + }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, @@ -21545,13 +23098,13 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "cstring"}, }, }, - ReturnType: &ast.TypeName{Name: "opaque"}, + ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "shell_out", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "opaque"}, + Type: &ast.TypeName{Name: "void"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, @@ -21572,19 +23125,19 @@ func genPGCatalog() *catalog.Schema { Name: "sign", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sign", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "similar_escape", @@ -21598,6 +23151,27 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "text"}, }, + { + Name: "similar_to_escape", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, + { + Name: "similar_to_escape", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "sin", Args: []*catalog.Argument{ @@ -21665,19 +23239,19 @@ func genPGCatalog() *catalog.Schema { Name: "sqrt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sqrt", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "starts_with", @@ -21700,16 +23274,16 @@ func genPGCatalog() *catalog.Schema { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -21718,7 +23292,7 @@ func genPGCatalog() *catalog.Schema { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21727,7 +23301,7 @@ func genPGCatalog() *catalog.Schema { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21736,7 +23310,7 @@ func genPGCatalog() *catalog.Schema { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21745,25 +23319,25 @@ func genPGCatalog() *catalog.Schema { Name: "stddev", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -21781,16 +23355,16 @@ func genPGCatalog() *catalog.Schema { Name: "stddev_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21799,7 +23373,7 @@ func genPGCatalog() *catalog.Schema { Name: "stddev_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21808,25 +23382,25 @@ func genPGCatalog() *catalog.Schema { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21835,25 +23409,25 @@ func genPGCatalog() *catalog.Schema { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -21966,9 +23540,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -21981,6 +23552,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -21988,25 +23562,28 @@ func genPGCatalog() *catalog.Schema { Name: "substring", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bit"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "substring", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "bit"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "substring", @@ -22017,9 +23594,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -22032,6 +23606,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "integer"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, @@ -22042,10 +23619,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "text"}, - }, - { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22069,28 +23643,28 @@ func genPGCatalog() *catalog.Schema { Name: "substring", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substring", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bit"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "bit"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "sum", @@ -22105,64 +23679,64 @@ func genPGCatalog() *catalog.Schema { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "interval"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "money"}, + Type: &ast.TypeName{Name: "interval"}, }, }, - ReturnType: &ast.TypeName{Name: "money"}, + ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "money"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "real"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "bigint"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "sum", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "suppress_redundant_updates_trigger", @@ -22284,7 +23858,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22293,7 +23867,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character"}, + Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22302,7 +23876,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "xml"}, + Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22311,7 +23885,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "char"}, + Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22320,7 +23894,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22329,7 +23903,7 @@ func genPGCatalog() *catalog.Schema { Name: "text", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "inet"}, + Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -22833,7 +24407,7 @@ func genPGCatalog() *catalog.Schema { Name: "time", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, @@ -22842,10 +24416,7 @@ func genPGCatalog() *catalog.Schema { Name: "time", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, @@ -22854,7 +24425,7 @@ func genPGCatalog() *catalog.Schema { Name: "time", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, @@ -22863,7 +24434,10 @@ func genPGCatalog() *catalog.Schema { Name: "time", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time with time zone"}, + Type: &ast.TypeName{Name: "time without time zone"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, @@ -22872,7 +24446,7 @@ func genPGCatalog() *catalog.Schema { Name: "time", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, @@ -23096,7 +24670,7 @@ func genPGCatalog() *catalog.Schema { Name: "timestamp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, @@ -23107,6 +24681,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "date"}, }, + { + Type: &ast.TypeName{Name: "time without time zone"}, + }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, @@ -23126,10 +24703,7 @@ func genPGCatalog() *catalog.Schema { Name: "timestamp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, - }, - { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, @@ -23524,9 +25098,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "date"}, }, - { - Type: &ast.TypeName{Name: "time with time zone"}, - }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, @@ -23534,10 +25105,10 @@ func genPGCatalog() *catalog.Schema { Name: "timestamptz", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "date"}, }, { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, @@ -23548,6 +25119,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "date"}, }, + { + Type: &ast.TypeName{Name: "time with time zone"}, + }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, @@ -23564,10 +25138,10 @@ func genPGCatalog() *catalog.Schema { Name: "timestamptz", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "date"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, @@ -23966,10 +25540,7 @@ func genPGCatalog() *catalog.Schema { Name: "timetz", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time with time zone"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, @@ -23978,7 +25549,10 @@ func genPGCatalog() *catalog.Schema { Name: "timetz", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "time without time zone"}, + Type: &ast.TypeName{Name: "time with time zone"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, @@ -24206,16 +25780,16 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, + ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, @@ -24227,13 +25801,13 @@ func genPGCatalog() *catalog.Schema { Name: "timezone", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "interval"}, }, { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, - ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, + ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timezone", @@ -24251,7 +25825,7 @@ func genPGCatalog() *catalog.Schema { Name: "timezone", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, @@ -24263,7 +25837,7 @@ func genPGCatalog() *catalog.Schema { Name: "timezone", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, @@ -24277,9 +25851,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -24290,7 +25861,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, @@ -24301,6 +25872,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "text"}, }, + { + Type: &ast.TypeName{Name: "name"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -24308,7 +25882,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp without time zone"}, + Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24320,7 +25894,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24344,7 +25918,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "timestamp with time zone"}, + Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24356,7 +25930,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "interval"}, + Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24368,7 +25942,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24380,7 +25954,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24392,7 +25966,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_char", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "text"}, @@ -24469,6 +26043,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "regclass"}, }, + { + Name: "to_regcollation", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "regcollation"}, + }, { Name: "to_regnamespace", Args: []*catalog.Argument{ @@ -24587,7 +26170,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_tsvector", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, @@ -24599,7 +26182,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "regconfig"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, @@ -24607,6 +26190,9 @@ func genPGCatalog() *catalog.Schema { { Name: "to_tsvector", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regconfig"}, + }, { Type: &ast.TypeName{Name: "jsonb"}, }, @@ -24620,7 +26206,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "regconfig"}, }, { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, @@ -24629,10 +26215,7 @@ func genPGCatalog() *catalog.Schema { Name: "to_tsvector", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "regconfig"}, - }, - { - Type: &ast.TypeName{Name: "json"}, + Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, @@ -24676,7 +26259,7 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "cstring"}, }, { - Name: "trunc", + Name: "trim_scale", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, @@ -24684,6 +26267,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "numeric"}, }, + { + Name: "trunc", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "double precision"}, + }, + }, + ReturnType: &ast.TypeName{Name: "double precision"}, + }, { Name: "trunc", Args: []*catalog.Argument{ @@ -24702,6 +26294,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, + { + Name: "trunc", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "numeric"}, + }, + }, + ReturnType: &ast.TypeName{Name: "numeric"}, + }, { Name: "trunc", Args: []*catalog.Argument{ @@ -24715,13 +26316,28 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "numeric"}, }, { - Name: "trunc", + Name: "ts_debug", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Name: "config", + Type: &ast.TypeName{Name: "regconfig"}, + }, + { + Name: "document", + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "ts_debug", + Args: []*catalog.Argument{ + { + Name: "document", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_delete", @@ -24775,16 +26391,16 @@ func genPGCatalog() *catalog.Schema { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "regconfig"}, + Type: &ast.TypeName{Name: "json"}, }, { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "tsquery"}, }, { - Type: &ast.TypeName{Name: "tsquery"}, + Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "jsonb"}, + ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", @@ -24793,52 +26409,49 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "regconfig"}, }, { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, - ReturnType: &ast.TypeName{Name: "jsonb"}, + ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "regconfig"}, + }, + { + Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "regconfig"}, - }, - { - Type: &ast.TypeName{Name: "json"}, + Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, @@ -24847,7 +26460,7 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "json"}, + ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", @@ -24856,19 +26469,22 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "regconfig"}, }, { - Type: &ast.TypeName{Name: "json"}, + Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, - ReturnType: &ast.TypeName{Name: "json"}, + ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "json"}, + Type: &ast.TypeName{Name: "regconfig"}, + }, + { + Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, @@ -24877,22 +26493,22 @@ func genPGCatalog() *catalog.Schema { Type: &ast.TypeName{Name: "text"}, }, }, - ReturnType: &ast.TypeName{Name: "json"}, + ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "regconfig"}, }, { - Type: &ast.TypeName{Name: "tsquery"}, + Type: &ast.TypeName{Name: "text"}, }, { - Type: &ast.TypeName{Name: "text"}, + Type: &ast.TypeName{Name: "tsquery"}, }, }, - ReturnType: &ast.TypeName{Name: "jsonb"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_headline", @@ -24906,6 +26522,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "tsquery"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "text"}, }, @@ -24913,20 +26532,17 @@ func genPGCatalog() *catalog.Schema { Name: "ts_headline", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "jsonb"}, + Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, - ReturnType: &ast.TypeName{Name: "jsonb"}, + ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "regconfig"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -24999,6 +26615,34 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "boolean"}, }, + { + Name: "ts_parse", + Args: []*catalog.Argument{ + { + Name: "parser_oid", + Type: &ast.TypeName{Name: "oid"}, + }, + { + Name: "txt", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "ts_parse", + Args: []*catalog.Argument{ + { + Name: "parser_name", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "txt", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "ts_rank", Args: []*catalog.Argument{ @@ -25011,15 +26655,15 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "tsquery"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "real[]"}, + }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25035,9 +26679,6 @@ func genPGCatalog() *catalog.Schema { { Name: "ts_rank", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "real[]"}, - }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25056,12 +26697,18 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "tsquery"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank_cd", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "real[]"}, + }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25074,6 +26721,9 @@ func genPGCatalog() *catalog.Schema { { Name: "ts_rank_cd", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "real[]"}, + }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25089,9 +26739,6 @@ func genPGCatalog() *catalog.Schema { { Name: "ts_rank_cd", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "real[]"}, - }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25104,9 +26751,6 @@ func genPGCatalog() *catalog.Schema { { Name: "ts_rank_cd", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "real[]"}, - }, { Type: &ast.TypeName{Name: "tsvector"}, }, @@ -25146,6 +26790,50 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, + { + Name: "ts_stat", + Args: []*catalog.Argument{ + { + Name: "query", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "ts_stat", + Args: []*catalog.Argument{ + { + Name: "query", + Type: &ast.TypeName{Name: "text"}, + }, + { + Name: "weights", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "ts_token_type", + Args: []*catalog.Argument{ + { + Name: "parser_oid", + Type: &ast.TypeName{Name: "oid"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, + { + Name: "ts_token_type", + Args: []*catalog.Argument{ + { + Name: "parser_name", + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "record"}, + }, { Name: "tsm_handler_in", Args: []*catalog.Argument{ @@ -25314,9 +27002,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "tsquery"}, }, - { - Type: &ast.TypeName{Name: "integer"}, - }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, @@ -25329,6 +27014,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "tsquery"}, }, + { + Type: &ast.TypeName{Name: "integer"}, + }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, @@ -25368,9 +27056,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "tsrange"}, }, @@ -25383,6 +27068,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "tsrange"}, }, @@ -25407,9 +27095,6 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, - { - Type: &ast.TypeName{Name: "text"}, - }, }, ReturnType: &ast.TypeName{Name: "tstzrange"}, }, @@ -25422,6 +27107,9 @@ func genPGCatalog() *catalog.Schema { { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, + { + Type: &ast.TypeName{Name: "text"}, + }, }, ReturnType: &ast.TypeName{Name: "tstzrange"}, }, @@ -25711,13 +27399,14 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "anyelement"}, }, { - Name: "upper", + Name: "unnest", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "text"}, + Name: "tsvector", + Type: &ast.TypeName{Name: "tsvector"}, }, }, - ReturnType: &ast.TypeName{Name: "text"}, + ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "upper", @@ -25728,6 +27417,15 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, + { + Name: "upper", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "text"}, + }, + }, + ReturnType: &ast.TypeName{Name: "text"}, + }, { Name: "upper_inc", Args: []*catalog.Argument{ @@ -25882,43 +27580,43 @@ func genPGCatalog() *catalog.Schema { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "integer"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -25927,7 +27625,7 @@ func genPGCatalog() *catalog.Schema { Name: "var_pop", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -25936,7 +27634,7 @@ func genPGCatalog() *catalog.Schema { Name: "var_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, @@ -25945,16 +27643,16 @@ func genPGCatalog() *catalog.Schema { Name: "var_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -25963,7 +27661,7 @@ func genPGCatalog() *catalog.Schema { Name: "var_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -25981,10 +27679,10 @@ func genPGCatalog() *catalog.Schema { Name: "var_samp", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "varbit", @@ -26140,7 +27838,13 @@ func genPGCatalog() *catalog.Schema { Name: "varchar", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "name"}, + Type: &ast.TypeName{Name: "character varying"}, + }, + { + Type: &ast.TypeName{Name: "integer"}, + }, + { + Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "character varying"}, @@ -26149,13 +27853,7 @@ func genPGCatalog() *catalog.Schema { Name: "varchar", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "character varying"}, - }, - { - Type: &ast.TypeName{Name: "integer"}, - }, - { - Type: &ast.TypeName{Name: "boolean"}, + Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "character varying"}, @@ -26215,25 +27913,25 @@ func genPGCatalog() *catalog.Schema { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "numeric"}, + Type: &ast.TypeName{Name: "double precision"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "bigint"}, + Type: &ast.TypeName{Name: "real"}, }, }, - ReturnType: &ast.TypeName{Name: "numeric"}, + ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "integer"}, + Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -26242,7 +27940,7 @@ func genPGCatalog() *catalog.Schema { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "smallint"}, + Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, @@ -26251,19 +27949,19 @@ func genPGCatalog() *catalog.Schema { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "real"}, + Type: &ast.TypeName{Name: "numeric"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "variance", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "double precision"}, + Type: &ast.TypeName{Name: "smallint"}, }, }, - ReturnType: &ast.TypeName{Name: "double precision"}, + ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "version", @@ -26300,6 +27998,9 @@ func genPGCatalog() *catalog.Schema { { Name: "websearch_to_tsquery", Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "regconfig"}, + }, { Type: &ast.TypeName{Name: "text"}, }, @@ -26309,9 +28010,6 @@ func genPGCatalog() *catalog.Schema { { Name: "websearch_to_tsquery", Args: []*catalog.Argument{ - { - Type: &ast.TypeName{Name: "regconfig"}, - }, { Type: &ast.TypeName{Name: "text"}, }, @@ -26327,6 +28025,18 @@ func genPGCatalog() *catalog.Schema { }, ReturnType: &ast.TypeName{Name: "double precision"}, }, + { + Name: "width_bucket", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "anyelement"}, + }, + { + Type: &ast.TypeName{Name: "anyarray"}, + }, + }, + ReturnType: &ast.TypeName{Name: "integer"}, + }, { Name: "width_bucket", Args: []*catalog.Argument{ @@ -26364,17 +28074,125 @@ func genPGCatalog() *catalog.Schema { ReturnType: &ast.TypeName{Name: "integer"}, }, { - Name: "width_bucket", + Name: "xid", Args: []*catalog.Argument{ { - Type: &ast.TypeName{Name: "anyelement"}, + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "xid"}, + }, + { + Name: "xid8cmp", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, }, { - Type: &ast.TypeName{Name: "anyarray"}, + Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, + { + Name: "xid8eq", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8ge", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8gt", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8in", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "cstring"}, + }, + }, + ReturnType: &ast.TypeName{Name: "xid8"}, + }, + { + Name: "xid8le", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8lt", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8ne", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "boolean"}, + }, + { + Name: "xid8out", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "cstring"}, + }, + { + Name: "xid8send", + Args: []*catalog.Argument{ + { + Type: &ast.TypeName{Name: "xid8"}, + }, + }, + ReturnType: &ast.TypeName{Name: "bytea"}, + }, { Name: "xideq", Args: []*catalog.Argument{ diff --git a/internal/tools/sqlc-pg-gen/main.go b/internal/tools/sqlc-pg-gen/main.go index 990920d1d0..2017715a71 100644 --- a/internal/tools/sqlc-pg-gen/main.go +++ b/internal/tools/sqlc-pg-gen/main.go @@ -8,13 +8,11 @@ import ( "log" "os" "path/filepath" + "sort" "strings" "text/template" pgx "github.com/jackc/pgx/v4" - - "github.com/kyleconroy/sqlc/internal/sql/ast" - "github.com/kyleconroy/sqlc/internal/sql/catalog" ) // https://stackoverflow.com/questions/25308765/postgresql-how-can-i-inspect-which-arguments-to-a-procedure-have-a-default-valu @@ -23,13 +21,14 @@ SELECT p.proname as name, format_type(p.prorettype, NULL), array(select format_type(unnest(p.proargtypes), NULL)), p.proargnames, - p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs] + p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs], + p.proargmodes::text[] FROM pg_catalog.pg_proc p LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE n.nspname OPERATOR(pg_catalog.~) '^(pg_catalog)$' - AND p.proargmodes IS NULL AND pg_function_is_visible(p.oid) -ORDER BY 1; +-- simply order all columns to keep subsequent runs stable +ORDER BY 1, 2, 3, 4, 5; ` // https://dba.stackexchange.com/questions/255412/how-to-select-functions-that-belong-in-a-given-extension-in-postgresql @@ -49,12 +48,13 @@ SELECT p.proname as name, format_type(p.prorettype, NULL), array(select format_type(unnest(p.proargtypes), NULL)), p.proargnames, - p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs] + p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs], + p.proargmodes::text[] FROM pg_catalog.pg_proc p JOIN extension_funcs ef ON ef.oid = p.oid -WHERE p.proargmodes IS NULL - AND pg_function_is_visible(p.oid) -ORDER BY 1; +WHERE pg_function_is_visible(p.oid) +-- simply order all columns to keep subsequent runs stable +ORDER BY 1, 2, 3, 4, 5; ` const catalogTmpl = ` @@ -70,7 +70,7 @@ import ( func {{.Name}}() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = []*catalog.Function{ - {{- range .Funcs}} + {{- range .Procs}} { Name: "{{.Name}}", Args: []*catalog.Argument{ @@ -81,11 +81,14 @@ func {{.Name}}() *catalog.Schema { {{- if .HasDefault}} HasDefault: true, {{- end}} - Type: &ast.TypeName{Name: "{{.Type.Name}}"}, + Type: &ast.TypeName{Name: "{{.TypeName}}"}, + {{- if ne .Mode "i" }} + Mode: {{ .GoMode }}, + {{- end}} }, {{end}} }, - ReturnType: &ast.TypeName{Name: "{{.ReturnType.Name}}"}, + ReturnType: &ast.TypeName{Name: "{{.ReturnTypeName}}"}, }, {{- end}} } @@ -117,7 +120,7 @@ func loadExtension(name string) *catalog.Schema { type tmplCtx struct { Pkg string Name string - Funcs []catalog.Function + Procs []Proc } func main() { @@ -132,51 +135,96 @@ type Proc struct { ArgTypes []string ArgNames []string HasDefault []string + ArgModes []string } -func clean(arg string) string { - arg = strings.TrimSpace(arg) - arg = strings.Replace(arg, "\"any\"", "any", -1) - arg = strings.Replace(arg, "\"char\"", "char", -1) - arg = strings.Replace(arg, "\"timestamp\"", "char", -1) - return arg +func (p *Proc) ReturnTypeName() string { + return clean(p.ReturnType) } -func (p Proc) Func() catalog.Function { - return catalog.Function{ - Name: p.Name, - Args: p.Args(), - ReturnType: &ast.TypeName{Name: clean(p.ReturnType)}, - } -} - -func (p Proc) Args() []*catalog.Argument { +func (p *Proc) Args() []Arg { + var args []Arg defaults := map[string]bool{} - var args []*catalog.Argument - if len(p.ArgTypes) == 0 { - return args - } for _, name := range p.HasDefault { defaults[name] = true } - for i, arg := range p.ArgTypes { - var name string + + for i, argType := range p.ArgTypes { + mode := "i" + name := "" + if i < len(p.ArgModes) { + mode = p.ArgModes[i] + } if i < len(p.ArgNames) { name = p.ArgNames[i] } - args = append(args, &catalog.Argument{ + + args = append(args, Arg{ Name: name, + Type: argType, + Mode: mode, HasDefault: defaults[name], - Type: &ast.TypeName{Name: clean(arg)}, }) } + + // Some manual changes until https://github.com/kyleconroy/sqlc/pull/1748 + // can be completely implmented + if p.Name == "mode" { + return nil + } + + if p.Name == "percentile_cont" && len(args) == 2 { + args = args[:1] + } + + if p.Name == "percentile_disc" && len(args) == 2 { + args = args[:1] + } + return args } -func scanFuncs(rows pgx.Rows) ([]catalog.Function, error) { +type Arg struct { + Name string + Mode string + Type string + HasDefault bool +} + +func (a *Arg) TypeName() string { + return clean(a.Type) +} + +// GoMode returns Go's representation of the arguemnt's mode +func (a *Arg) GoMode() string { + switch a.Mode { + case "", "i": + return "ast.FuncParamIn" + case "o": + return "ast.FuncParamOut" + case "b": + return "ast.FuncParamInOut" + case "v": + return "ast.FuncParamVariadic" + case "t": + return "ast.FuncParamTable" + } + + return "" +} + +func clean(arg string) string { + arg = strings.TrimSpace(arg) + arg = strings.Replace(arg, "\"any\"", "any", -1) + arg = strings.Replace(arg, "\"char\"", "char", -1) + arg = strings.Replace(arg, "\"timestamp\"", "char", -1) + return arg +} + +func scanProcs(rows pgx.Rows) ([]Proc, error) { defer rows.Close() // Iterate through the result set - var funcs []catalog.Function + var procs []Proc for rows.Next() { var p Proc err := rows.Scan( @@ -185,6 +233,7 @@ func scanFuncs(rows pgx.Rows) ([]catalog.Function, error) { &p.ArgTypes, &p.ArgNames, &p.HasDefault, + &p.ArgModes, ) if err != nil { return nil, err @@ -217,9 +266,9 @@ func scanFuncs(rows pgx.Rows) ([]catalog.Function, error) { continue } - funcs = append(funcs, p.Func()) + procs = append(procs, p) } - return funcs, rows.Err() + return procs, rows.Err() } func run(ctx context.Context) error { @@ -238,12 +287,39 @@ func run(ctx context.Context) error { if err != nil { return err } - funcs, err := scanFuncs(rows) + allProcs, err := scanProcs(rows) if err != nil { return err } + + // Preserve the legacy sort order of the end-to-end tests + sort.SliceStable(allProcs, func(i, j int) bool { + fnA := allProcs[i] + fnB := allProcs[j] + + if fnA.Name == "lower" && fnB.Name == "lower" && len(fnA.ArgTypes) == 1 && fnA.ArgTypes[0] == "text" { + return true + } + + if fnA.Name == "generate_series" && fnB.Name == "generate_series" && len(fnA.ArgTypes) == 2 && fnA.ArgTypes[0] == "numeric" { + return true + } + + return false + }) + + procs := make([]Proc, 0, len(allProcs)) + for _, p := range allProcs { + // Skip generating concat to preserve legacy behavior + if p.Name == "concat" { + continue + } + + procs = append(procs, p) + } + out := bytes.NewBuffer([]byte{}) - if err := tmpl.Execute(out, tmplCtx{Pkg: "postgresql", Name: "genPGCatalog", Funcs: funcs}); err != nil { + if err := tmpl.Execute(out, tmplCtx{Pkg: "postgresql", Name: "genPGCatalog", Procs: procs}); err != nil { return err } code, err := format.Source(out.Bytes()) @@ -275,16 +351,31 @@ func run(ctx context.Context) error { if err != nil { return err } - funcs, err := scanFuncs(rows) + procs, err := scanProcs(rows) if err != nil { return err } - if len(funcs) == 0 { + if len(procs) == 0 { log.Printf("no functions in %s, skipping", extension) continue } + + // Preserve the legacy sort order of the end-to-end tests + sort.SliceStable(procs, func(i, j int) bool { + fnA := procs[i] + fnB := procs[j] + + if extension == "pgcrypto" { + if fnA.Name == "digest" && fnB.Name == "digest" && len(fnA.ArgTypes) == 2 && fnA.ArgTypes[0] == "text" { + return true + } + } + + return false + }) + out := bytes.NewBuffer([]byte{}) - if err := tmpl.Execute(out, tmplCtx{Pkg: "contrib", Name: funcName, Funcs: funcs}); err != nil { + if err := tmpl.Execute(out, tmplCtx{Pkg: "contrib", Name: funcName, Procs: procs}); err != nil { return err } code, err := format.Source(out.Bytes())