Skip to content

Commit

Permalink
lnhsingh feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ericharmeling committed Sep 24, 2020
1 parent 6ada6cd commit d7473e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions v20.2/alter-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ALTER SCHEMA ... OWNER TO {<newowner> | CURRENT_USER | SESSION_USER }

Parameter | Description
----------|------------
`RENAME TO ...` | Rename the schema.
`OWNER TO ...` | Change the owner of the schema. You can specify the new owner with a string literal or the [`CURRENT_USER` or `SESSION_USER` keywords](functions-and-operators.html#special-syntax-forms).
`RENAME TO ...` | Rename the schema. The new schema name must be unique within its database and follow these [identifier rules](keywords-and-identifiers.html#identifiers). When the parent database is not set as the default, the name must be formatted as `database.name`.
`OWNER TO ...` | Change the owner of the schema. You can specify the new owner with a [string literal](https://en.wikipedia.org/wiki/String_literal) or the [`CURRENT_USER` or `SESSION_USER` keywords](functions-and-operators.html#special-syntax-forms).

## Required privileges

Expand Down Expand Up @@ -120,7 +120,7 @@ WHERE
(1 row)
~~~

Rename the schema as its owner:
As its owner, you can rename the schema:

{% include copy-clipboard.html %}
~~~ sql
Expand Down
4 changes: 2 additions & 2 deletions v20.2/create-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Parameter | Description
----------|------------
`IF NOT EXISTS` | Create a new schema only if a schema of the same name does not already exist. If one does exist, do not return an error.
`schemaname` | The name of the schema to create, which must be unique and follow these [identifier rules](keywords-and-identifiers.html#identifiers).
`AUTHORIZATION ...` | Optionally identify a user to be the owner of the schema. You can specify the owner with a string literal, or the [`CURRENT_USER` or `SESSION_USER` keywords](functions-and-operators.html#special-syntax-forms).<br><br>If a `CREATE SCHEMA` statement has an `AUTHORIZATION` clause, but no `schemaname`, the schema will be named after the specified owner of the schema. If a `CREATE SCHEMA` statement does not have an `AUTHORIZATION` clause, the user executing the statement will be named the owner.
`AUTHORIZATION ...` | Optionally identify a user to be the owner of the schema. You can specify the owner with a [string literal](https://en.wikipedia.org/wiki/String_literal), or the [`CURRENT_USER` or `SESSION_USER` keywords](functions-and-operators.html#special-syntax-forms).<br><br>If a `CREATE SCHEMA` statement has an `AUTHORIZATION` clause, but no `schemaname`, the schema will be named after the specified owner of the schema. If a `CREATE SCHEMA` statement does not have an `AUTHORIZATION` clause, the user executing the statement will be named the owner.

## Example

Expand Down Expand Up @@ -272,7 +272,7 @@ $ cockroach sql --url 'postgres://max:roach@host:port/db?sslmode=require'
(2 rows)
~~~

`max` then inserts some values into the `accounts` table, without specifying a schema.
`max` then inserts some values into the `accounts` table, without specifying a schema:

{% include copy-clipboard.html %}
~~~ sql
Expand Down

0 comments on commit d7473e4

Please sign in to comment.