Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
85965: ccl/jwtauthccl: Implement JWT based auth for CRDB SSO r=kpatron-cockroachlabs a=kpatron-cockroachlabs

In order to enable future work to allow customers to log into
CRDB instances using SSO, this change implements a new type of
auth based on JWTs. Its enablement and configuration is controlled
by cluster settings instead of being added as an hba_conf option.

In particular, this change introduces three cluster settings:
server.jwt_authentication.enable, server.jwt_authentication.jwks,
and server.jwt_authentication.issuers. If during login, the custom
option `--jwt.auth=true` is sent, the JWT code path is activated
and the contents of the "password" field are analyzed as a token,
if the enabled cluster setting is set to true.

The token signature is validated with the jwks cluster setting.
The token's expiration time is validated, the subject field is
matched to the username requested, the audience is field is
matched against the cluster's ID and the issuer is matched to
the value of the issuers cluster setting.

Finally, if the token passes all of those checks, CRDB ensures
that an enterprise license is active.

Release note (enterprise change): A new JWT based auth method
has been introduced as an option. This work lays the ground
work for users to have SSO based login into their
CockroachDB Dedicated clusters.

87292: Fix show_backup diagram. r=nickvigilante a=stbof

DOC-5517

The show_backup diagram doesn't unlink `location_opt_list`, so links to it in the SQL grammar. The master branch build fails.

Release justification: diagram update.

87932: Diagrams for UDF statements. r=chengxiong-ruan a=stbof



88408: kvserver,clusterversion: {version,feature}-gate lease upgrade logic r=irfansharif a=irfansharif

Informs #88301. EnableLeaseUpgrade version gates a change in the lease transfer protocol whereby we only ever transfer expiration-based leases (and have recipients later upgrade them to the more efficient epoch based ones). This was done to limit the effects of ill-advised lease transfers since the incoming leaseholder would need to recognize itself as such within a few seconds. This needs version gating so that in mixed-version clusters, as part of lease transfers, we don't start sending out expiration based leases to nodes that (i) don't expect them for certain keyspans, and (ii) don't know to upgrade them to efficient epoch-based ones.

While here, we also introduce a (hidden, default=true) cluster setting kv.transfer_expiration_leases_first.enabled to feature gate this protocol change.

Co-authored-by: Kyle Patron <kyle@cockroachlabs.com>
Co-authored-by: Stephanie Bodoff <stephanie@cockroachlabs.com>
Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
  • Loading branch information
4 people committed Sep 23, 2022
5 parents 14f11eb + 165f67a + c134dd1 + e40e347 + fc2d180 commit 099da40
Show file tree
Hide file tree
Showing 36 changed files with 2,085 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
/pkg/ccl/cmdccl/enc_utils/ @cockroachdb/storage
/pkg/ccl/cmdccl/stub-schema-registry/ @cockroachdb/cdc-prs
/pkg/ccl/gssapiccl/ @cockroachdb/unowned
/pkg/ccl/jwtauthccl/ @cockroachdb/cloud-identity
/pkg/ccl/kvccl/ @cockroachdb/kv-noreview
/pkg/ccl/kvccl/kvtenantccl/ @cockroachdb/multi-tenant
/pkg/ccl/upgradeccl/ @cockroachdb/unowned
Expand All @@ -217,6 +218,7 @@
/pkg/ccl/serverccl/tenant_* @cockroachdb/multi-tenant @cockroachdb/server-prs
/pkg/ccl/serverccl/statusccl @cockroachdb/sql-observability @cockroachdb/multi-tenant
/pkg/ccl/telemetryccl/ @cockroachdb/obs-inf-prs
/pkg/ccl/testccl/authccl/ @cockroachdb/cloud-identity
/pkg/ccl/testccl/sqlccl/ @cockroachdb/sql-queries
/pkg/ccl/testccl/workload/schemachange/ @cockroachdb/sql-schema
/pkg/ccl/testutilsccl/ @cockroachdb/test-eng-noreview
Expand Down
96 changes: 93 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,26 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/davecgh/go-spew/com_github_davecgh_go_spew-v1.1.1.zip",
],
)
go_repository(
name = "com_github_decred_dcrd_crypto_blake256",
build_file_proto_mode = "disable_global",
importpath = "github.com/decred/dcrd/crypto/blake256",
sha256 = "cd8bbdae14641f0ba44430fc66990dd37bbfcf1e21a965a9fd1871d16cac127d",
strip_prefix = "github.com/decred/dcrd/crypto/blake256@v1.0.0",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/decred/dcrd/crypto/blake256/com_github_decred_dcrd_crypto_blake256-v1.0.0.zip",
],
)
go_repository(
name = "com_github_decred_dcrd_dcrec_secp256k1_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4",
sha256 = "ce895eb53e69a058a77bc7e599fc43cef64b3c639ffec2f34faa7fef1331665d",
strip_prefix = "github.com/decred/dcrd/dcrec/secp256k1/v4@v4.1.0",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/decred/dcrd/dcrec/secp256k1/v4/com_github_decred_dcrd_dcrec_secp256k1_v4-v4.1.0.zip",
],
)
go_repository(
name = "com_github_deepmap_oapi_codegen",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -3262,6 +3282,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.0.2.zip",
],
)
go_repository(
name = "com_github_goccy_go_json",
build_file_proto_mode = "disable_global",
importpath = "github.com/goccy/go-json",
sha256 = "018970f0a0d7337bd2a6583f1b68bcc9f9f4830df14ca1ccf1f2020fff9b3adb",
strip_prefix = "github.com/goccy/go-json@v0.9.11",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/goccy/go-json/com_github_goccy_go_json-v0.9.11.zip",
],
)
go_repository(
name = "com_github_gocql_gocql",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -5213,6 +5243,66 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/leodido/go-urn/com_github_leodido_go_urn-v1.2.0.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_backoff_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/backoff/v2",
sha256 = "f5ded39eec777b7de879eb04204aa4b322683dabb22137862b09cb464f5bc617",
strip_prefix = "github.com/lestrrat-go/backoff/v2@v2.0.8",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/backoff/v2/com_github_lestrrat_go_backoff_v2-v2.0.8.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_blackmagic",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/blackmagic",
sha256 = "0621ab66f2510093f86f838db09a698027e8cbf08cc0e52bfa7d359b4f1b3745",
strip_prefix = "github.com/lestrrat-go/blackmagic@v1.0.1",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/blackmagic/com_github_lestrrat_go_blackmagic-v1.0.1.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_httpcc",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/httpcc",
sha256 = "d75132f805ea5cf6275d9af02a5ff3c116ad92ac7fc28e2a22b8fd2e029a3f4c",
strip_prefix = "github.com/lestrrat-go/httpcc@v1.0.1",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/httpcc/com_github_lestrrat_go_httpcc-v1.0.1.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_iter",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/iter",
sha256 = "991bf0aee428fc1a2c01d548e2c7996dc26871dd0b359c062dfc07b1fb137572",
strip_prefix = "github.com/lestrrat-go/iter@v1.0.2",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/iter/com_github_lestrrat_go_iter-v1.0.2.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_jwx",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/jwx",
sha256 = "808d6fe46171b8d6bb0a44188d7886d864f1aad5ce29b8ce1c6048745183c645",
strip_prefix = "github.com/lestrrat-go/jwx@v1.2.25",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/jwx/com_github_lestrrat_go_jwx-v1.2.25.zip",
],
)
go_repository(
name = "com_github_lestrrat_go_option",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/option",
sha256 = "8c42afc182c5697b8d5e38f5004ae522fa437247850ca2cf9fe65a6ae18bfaa9",
strip_prefix = "github.com/lestrrat-go/option@v1.0.0",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/option/com_github_lestrrat_go_option-v1.0.0.zip",
],
)
go_repository(
name = "com_github_lib_pq",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -9264,10 +9354,10 @@ def go_deps():
name = "org_golang_x_crypto",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/crypto",
sha256 = "81dbe3648b3bb1f191ac7584626106bf0a8ceccd62e1cd33dbb0e4bd266d1340",
strip_prefix = "golang.org/x/crypto@v0.0.0-20220518034528-6f7dac969898",
sha256 = "e87162606239c6599915ef6a938c397aef25f5bc58717ab749ca1780ee783101",
strip_prefix = "golang.org/x/crypto@v0.0.0-20220817201139-bc19a97f63c8",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.0.0-20220518034528-6f7dac969898.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.0.0-20220817201139-bc19a97f63c8.zip",
],
)
go_repository(
Expand Down
2 changes: 2 additions & 0 deletions TEAMS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ cockroachdb/jobs:
aliases:
cockroachdb/jobs-prs: other
triage_column_id: 16360666
cockroachdb/cloud-identity:
triage_column_id: 18588697
cockroachdb/unowned:
aliases:
cockroachdb/rfc-prs: other
Expand Down
11 changes: 10 additions & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/dave/kerr/com_github_dave_kerr-v0.0.0-20170318121727-bc25dd6abe8e.zip": "58bfff20a2f687e0f607887e88ff1044fe22186765e93b794511b1a0a625eaa1",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/dave/rebecca/com_github_dave_rebecca-v0.9.1.zip": "74c7f193fcc4a165903e3761dbff05e73e6fcd92f8cf0861029487e65da40439",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/davecgh/go-spew/com_github_davecgh_go_spew-v1.1.1.zip": "6b44a843951f371b7010c754ecc3cabefe815d5ced1c5b9409fb2d697e8a890d",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/decred/dcrd/crypto/blake256/com_github_decred_dcrd_crypto_blake256-v1.0.0.zip": "cd8bbdae14641f0ba44430fc66990dd37bbfcf1e21a965a9fd1871d16cac127d",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/decred/dcrd/dcrec/secp256k1/v4/com_github_decred_dcrd_dcrec_secp256k1_v4-v4.1.0.zip": "ce895eb53e69a058a77bc7e599fc43cef64b3c639ffec2f34faa7fef1331665d",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/deepmap/oapi-codegen/com_github_deepmap_oapi_codegen-v1.6.0.zip": "a89ac7cc533495fb5aa9caf2f763394af143928bf38a351495d93e220744dc4e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/denisenkom/go-mssqldb/com_github_denisenkom_go_mssqldb-v0.12.0.zip": "568024c79d9e6c39adfa14ed4650c95ae1f976eb9c1ebee77da3c53d200080cf",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/dennwc/varint/com_github_dennwc_varint-v1.0.0.zip": "2918e66c0fb5a82dbfc8cca1ed34cb8ccff8188e876c0ca25f85b8247e53626f",
Expand Down Expand Up @@ -367,6 +369,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/gobwas/httphead/com_github_gobwas_httphead-v0.0.0-20180130184737-2c6c146eadee.zip": "5a43ed4a7cd2b063b634f0df5311c0dfa6576683bfc1339f2c5b1b1127fc392b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/gobwas/pool/com_github_gobwas_pool-v0.2.0.zip": "52604b1456b92bb310461167a3e6515562f0f4214f01ed6440e3105f78be188f",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.0.2.zip": "f9e5c26e83278f19958c68be7b76ad6711c806b6dae766fad7692d2af867bedd",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/goccy/go-json/com_github_goccy_go_json-v0.9.11.zip": "018970f0a0d7337bd2a6583f1b68bcc9f9f4830df14ca1ccf1f2020fff9b3adb",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/gocql/gocql/com_github_gocql_gocql-v0.0.0-20200228163523-cd4b606dd2fb.zip": "40095e622040db188068b66258742938a5b083f6696b46b4a40c0391f0dafcec",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/godbus/dbus/com_github_godbus_dbus-v0.0.0-20190422162347-ade71ed3457e.zip": "4949c4ae117d0c306a28bb05a7da82be3c4a76676939e6ec60540335c8eff90d",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/godbus/dbus/v5/com_github_godbus_dbus_v5-v5.0.6.zip": "0097f9b4608dc4bf5ca63cd3a9f3334e5cff6be2cab6170cdef075ef97075d89",
Expand Down Expand Up @@ -554,6 +557,12 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/labstack/gommon/com_github_labstack_gommon-v0.3.0.zip": "2783ed1c24d09a5539bc35954f71f41d270d78dc656be256c98a8ede2cbbe451",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/leanovate/gopter/com_github_leanovate_gopter-v0.2.5-0.20190402064358-634a59d12406.zip": "67c9724f8c25304bdef375d15c39f98621e0448b5f3c2f55bf66e07b52a67128",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/leodido/go-urn/com_github_leodido_go_urn-v1.2.0.zip": "8a854d784171000a69b79babb2cd3da9b8fccb1e1b6bb102c7a6d2b52380d08a",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/backoff/v2/com_github_lestrrat_go_backoff_v2-v2.0.8.zip": "f5ded39eec777b7de879eb04204aa4b322683dabb22137862b09cb464f5bc617",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/blackmagic/com_github_lestrrat_go_blackmagic-v1.0.1.zip": "0621ab66f2510093f86f838db09a698027e8cbf08cc0e52bfa7d359b4f1b3745",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/httpcc/com_github_lestrrat_go_httpcc-v1.0.1.zip": "d75132f805ea5cf6275d9af02a5ff3c116ad92ac7fc28e2a22b8fd2e029a3f4c",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/iter/com_github_lestrrat_go_iter-v1.0.2.zip": "991bf0aee428fc1a2c01d548e2c7996dc26871dd0b359c062dfc07b1fb137572",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/jwx/com_github_lestrrat_go_jwx-v1.2.25.zip": "808d6fe46171b8d6bb0a44188d7886d864f1aad5ce29b8ce1c6048745183c645",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lestrrat-go/option/com_github_lestrrat_go_option-v1.0.0.zip": "8c42afc182c5697b8d5e38f5004ae522fa437247850ca2cf9fe65a6ae18bfaa9",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lib/pq/com_github_lib_pq-v1.10.6.zip": "7247dc4284bb572dd8bb3932ab1bf8a3de953882ade18c31a240838af8c73ee9",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lightstep/lightstep-tracer-common/golang/gogo/com_github_lightstep_lightstep_tracer_common_golang_gogo-v0.0.0-20190605223551-bc2310a04743.zip": "1bf5cd77739238376e20a64307ef850da518861421a44ce7a10a27bc3bef4874",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/lightstep/lightstep-tracer-go/com_github_lightstep_lightstep_tracer_go-v0.18.1.zip": "b90e4c08ddd881bf09dfef53affd03c9d3b246edf64e055dbea549bd31268131",
Expand Down Expand Up @@ -860,7 +869,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/go.uber.org/zap/org_uber_go_zap-v1.19.0.zip": "6437824258873fed421b7975b8e4cafd1be80cdc15e553beaa887b499dd01420",
"https://storage.googleapis.com/cockroach-godeps/gomod/goji.io/io_goji-v2.0.2+incompatible.zip": "1ea69b28e356cb91381ce2339004fcf144ad1b268c9e3497c9ef304751ae0bb3",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/arch/org_golang_x_arch-v0.0.0-20180920145803-b19384d3c130.zip": "9f67b677a3fefc503111d9aa7df8bacd2677411b0fcb982eb1654aa6d14cc3f8",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.0.0-20220518034528-6f7dac969898.zip": "81dbe3648b3bb1f191ac7584626106bf0a8ceccd62e1cd33dbb0e4bd266d1340",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.0.0-20220817201139-bc19a97f63c8.zip": "e87162606239c6599915ef6a938c397aef25f5bc58717ab749ca1780ee783101",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20220104160115-025e73f80486.zip": "50e096afbb8e0f073519dd05f6573aefe410a829c87a7c1b64efb8c4a3948c50",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/exp/typeparams/org_golang_x_exp_typeparams-v0.0.0-20220713135740-79cabaa25d75.zip": "27a9b60bc717c7882d812a302cc6e64df1617789eac7c740e331eb09877a416f",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/image/org_golang_x_image-v0.0.0-20190802002840-cff245a6509b.zip": "4a44b498934a95e8f84e8374530de0cab38d81fcd558898d4880c3c5ce1efe47",
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/settings/settings-for-tenants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@ trace.jaeger.agent string the address of a Jaeger agent to receive traces using
trace.opentelemetry.collector string address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as <host>:<port>. If no port is specified, 4317 will be used.
trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector string the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.
version version 1000022.1-70 set the active cluster version in the format '<major>.<minor>'
version version 1000022.1-72 set the active cluster version in the format '<major>.<minor>'
2 changes: 1 addition & 1 deletion docs/generated/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@
<tr><td><code>trace.opentelemetry.collector</code></td><td>string</td><td><code></code></td><td>address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as <host>:<port>. If no port is specified, 4317 will be used.</td></tr>
<tr><td><code>trace.span_registry.enabled</code></td><td>boolean</td><td><code>true</code></td><td>if set, ongoing traces can be seen at https://<ui>/#/debug/tracez</td></tr>
<tr><td><code>trace.zipkin.collector</code></td><td>string</td><td><code></code></td><td>the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>1000022.1-70</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>1000022.1-72</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
</tbody>
</table>
10 changes: 5 additions & 5 deletions docs/generated/sql/bnf/alter_func_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
alter_func_stmt ::=
alter_func_options_stmt
| alter_func_rename_stmt
| alter_func_owner_stmt
| alter_func_set_schema_stmt
| alter_func_dep_extension_stmt
( 'ALTER' 'FUNCTION' function_with_argtypes ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) )* ) ( 'RESTRICT' | ) )
| ( 'ALTER' 'FUNCTION' function_with_argtypes 'RENAME' 'TO' name )
| ( 'ALTER' 'FUNCTION' function_with_argtypes 'OWNER' 'TO' role_spec )
| ( 'ALTER' 'FUNCTION' function_with_argtypes 'SET' 'SCHEMA' schema_name )
| ( 'ALTER' 'FUNCTION' function_with_argtypes ( 'NO' | ) 'DEPENDS' 'ON' 'EXTENSION' name )
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/create_func_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
create_func_stmt ::=
'CREATE' opt_or_replace 'FUNCTION' func_create_name '(' opt_func_arg_with_default_list ')' 'RETURNS' opt_return_set func_return_type opt_create_func_opt_list opt_routine_body
'CREATE' ( 'OR' 'REPLACE' | ) 'FUNCTION' func_create_name '(' ( ( ( ( func_arg | func_arg | func_arg ) ) ( ( ',' ( func_arg | func_arg | func_arg ) ) )* ) | ) ')' 'RETURNS' ( | ) ( func_arg_type ) ( ( ( ( 'AS' func_as | 'LANGUAGE' 'SQL' | ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) ) ( ( ( 'AS' func_as | 'LANGUAGE' 'SQL' | ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) ) )* ) | ) opt_routine_body
Loading

0 comments on commit 099da40

Please sign in to comment.