Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE SCHEMA... AUTHORIZATION is unsupported #53559

Closed
vy-ton opened this issue Aug 27, 2020 · 1 comment · Fixed by #53583
Closed

CREATE SCHEMA... AUTHORIZATION is unsupported #53559

vy-ton opened this issue Aug 27, 2020 · 1 comment · Fixed by #53583

Comments

@vy-ton
Copy link
Contributor

vy-ton commented Aug 27, 2020

In Postgres,

postgres=# create user andy;
CREATE ROLE
postgres=# CREATE SCHEMA AUTHORIZATION andy;
CREATE SCHEMA
postgres=# CREATE SCHEMA andy_schema AUTHORIZATION andy;
CREATE SCHEMA
postgres=# \dn
    List of schemas
    Name     |  Owner
-------------+----------
 andy        | andy
 andy_schema | andy
 public      | postgres
(3 rows)

In CockroachDB,

[email protected]:63916/vy> CREATE SCHEMA AUTHORIZATION andy;
invalid syntax: statement ignored: at or near "andy": syntax error
SQLSTATE: 42601
DETAIL: source SQL:
CREATE SCHEMA AUTHORIZATION andy
                            ^
[email protected]:63916/vy> CREATE SCHEMA andy_schema AUTHORIZATION andy;
invalid syntax: statement ignored: at or near "authorization": syntax error
SQLSTATE: 42601
DETAIL: source SQL:
CREATE SCHEMA andy_schema AUTHORIZATION andy
                          ^

We should at least return an unimplemented error

@blathers-crl
Copy link

blathers-crl bot commented Aug 27, 2020

Hi @vy-ton, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

rohany added a commit to rohany/cockroach that referenced this issue Aug 31, 2020
Fixes cockroachdb#53559.

This commit adds the `CREATE SCHEMA ... AUTHORIZATION` command. When
authorization is provided, the target user is given ownership of the
schema. If the schema name is not provided, then the schema is named the
same name as the target role.

Release justification: low risk updates to new functionality
Release note (sql change): Support the `CREATE SCHEMA ... AUTHORIZATION`
command.
rohany added a commit to rohany/cockroach that referenced this issue Aug 31, 2020
Fixes cockroachdb#53559.

This commit adds the `CREATE SCHEMA ... AUTHORIZATION` command. When
authorization is provided, the target user is given ownership of the
schema. If the schema name is not provided, then the schema is named the
same name as the target role.

Release justification: low risk updates to new functionality
Release note (sql change): Support the `CREATE SCHEMA ... AUTHORIZATION`
command.
craig bot pushed a commit that referenced this issue Aug 31, 2020
…53702 #53703 #53704 #53706

53574: sql: fix race in execStmtInOpenState r=solongordon a=solongordon

Fixes #53573

Release justification: low-risk update to new functionality

Release note: None

53583: sql: implement `CREATE SCHEMA ... AUTHORIZATION` r=rohany a=rohany

Fixes #53559.

This commit adds the `CREATE SCHEMA ... AUTHORIZATION` command. When
authorization is provided, the target user is given ownership of the
schema. If the schema name is not provided, then the schema is named the
same name as the target role.

Release justification: low risk updates to new functionality
Release note (sql change): Support the `CREATE SCHEMA ... AUTHORIZATION`
command.

53670: vendor: Bump pebble to e6a9f9a3c936adb8ee8642e4afb2c1ff8dee4562 r=itsbilal a=itsbilal

Changes pulled in:
 - e6a9f9a3c936adb8ee8642e4afb2c1ff8dee4562 compaction: Don't set grandparent limit "behind" keys in fragmenter
 - 04c6a8caf99b691124110f869ef288832cb89356 cmd/pebble: fix rocksdb build errors
 - 4c3a7a171486d287c872cd9bfb38fd811fb0199b internal/manifest: add clone method to iterator
 - 778e980e984175bcb1adb1d09c88a5e04b7762e1 internal/manifest: update FileMetadata refcounts within B-Tree
 - 841f44b62f4bba532d646486928a75c24b66d380 internal/manifest: prohibit overwritten keys in B-Tree
 - 341164583f87cb754452e7c085d22e0119f25c24 *: Add diskHealthChecking{FS,File}, use it to wrap disk writes

Only changes that affect Cockroach are the first and last list items
above.

Release justification: Bugfix change in Pebble, plus a low-risk
change for better visibility into slow disks.

Release note: None.

53679: roachtest: deflake some tests r=irfansharif a=knz

Fixes #53462
Fixes #53520

Release justification: non-production code changes

Release note: None

53685: security: add telemetry for OCSP server checks r=irfansharif a=knz

Fixes  #53473
cc @thtruo 

This commit adds two telemetry counters:

- `server.ocsp.conn-verifications` counts the number of connections
  for which the OCSP feature is enabled

- `server.ocsp.cert-verifications` counts the number of times
  a certificate actually underwent OCSP verification.

Release justification: low risk, high benefit changes to existing functionality

Release note: None

53688: geo/geomfn: implement ST_SymmetricDifference r=otan a=CyrusJavan

Added ST_SymmetricDifference builtin.

ST_SymmetricDifference is simply an alias for ST_SymDifference.

Release justification: low-risk update to new functionality
Release note (sql change): Implemented the geometry based builtin
`ST_SymmetricDifference`.

Resolves: #49052

53689: roachtests: re-enable election-after-restart and kv/gracefuldraining/nodes=3 r=irfansharif a=knz

Fixes #35047
Fixes #33501

**Note that I dislike the idea to run any roachtest under stressrace in the first place.**

Release justification: non-production code changes

Release note: None

53693: roachtest: re-enable acceptance/bank/zerosum-restart r=irfansharif a=knz

Fixes #33683

This test had been flaking earlier in 2019 due to unclean graceful
shutdowns. Since we've heavily reworked that logic since, let's give
the test a second chance.

Release justification: non-production code changes

Release note: None

53695: roachtest: re-enable acceptance/bank/zerosum-splits (revert #34080)  r=irfansharif a=knz

First commit from #53693.

PR #34080 which intended to skip `bank/zerosum-restarts`,
mistakenly skipped `bank/zerosum-splits` instead.
(As `zerosum-restarts` had been skipped already prior)

There was no reason to skip `zerosum-splits`, so this commit
re-enables it.

Release justification: non-production code changes

Release note: None

53702: geos: fix compile error with -Wsign-conversion r=sumeerbhola a=otan

Not sure why this wasn't caught in #53647.

Release justification: bug fixes and low-risk updates to new
functionality

Release note: None

53703: cloud: update orchestrator configs to point to v20.1.5 r=jlinder a=arulajmani

Release justification: changes as part of v20.1.5 release.
Release note: None

53704: sql: update `format_type` to handle user defined types r=rohany a=rohany

Fixes #53684.

Update the `format_type` builtin to handle user defined types.

Release justification: bug fix
Release note: None

53706: roachprod: Build Charybdefs against thrift 0.13 r=itsbilal a=itsbilal

As we use Ubuntu 18.04 on Roachprod clusters, which has
a newer version of bundler and ruby, we have to use a newer
version of Thrift. Using newer Thrift also necessitates some
changes in Charybdefs' build files, so I've forked it, used
the fork here, and submitted the changes upstream:
scylladb/charybdefs#21

Fixes #52533.

Release justification: Roachtest/roachprod only fix.
Release note: None.

Co-authored-by: Solon Gordon <[email protected]>
Co-authored-by: Rohan Yadav <[email protected]>
Co-authored-by: Bilal Akhtar <[email protected]>
Co-authored-by: Raphael 'kena' Poss <[email protected]>
Co-authored-by: Cyrus Javan <[email protected]>
Co-authored-by: Oliver Tan <[email protected]>
Co-authored-by: arulajmani <[email protected]>
@craig craig bot closed this as completed in 155b79d Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant