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

[YB-Docs] example on "create schema" page fails #8863

Closed
nmantrav2 opened this issue Jun 11, 2021 · 4 comments · Fixed by #17190
Closed

[YB-Docs] example on "create schema" page fails #8863

nmantrav2 opened this issue Jun 11, 2021 · 4 comments · Fixed by #17190
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue
Milestone

Comments

@nmantrav2
Copy link
Contributor

nmantrav2 commented Jun 11, 2021

Jira Link: DB-2056
Following example for "Create a schema and an object within that schema." section fails (on this page)

postgres=# CREATE SCHEMA branch
postgres-#                CREATE TABLE dept(
postgres(#                    dept_id INT NOT NULL,
postgres(#                    dept_name TEXT NOT NULL,
postgres(#                    PRIMARY KEY (dept_id)
postgres(#                );
ERROR:  CREATE SCHEMA with elements not supported yet
LINE 2:                CREATE TABLE dept(
                       ^
HINT:  Please report the issue on https://github.com/YugaByte/yugabyte-db/issues

Additional problems...

Step 1, "Create a schema" should be IF NOT EXISTS (not EXIST)

And, this step fails:

yugabyte=# CREATE SCHEMA branch AUTHORIZATION john;
ERROR:  schema "branch" already exists
@bllewell
Copy link
Contributor

bllewell commented Jun 11, 2021

OK. The code block shown above is not the only one that causes an error. The very first (without that silly prompt) is spelled thus:

CREATE SCHEMA IF NOT EXIST branch;

Obviously this is wrong too. It should be IF NOT EXISTS with an S. I'll makse sure that the syntax of _every_code block is correct. (Errors due to missing, or wrong, functionality are tracked by separate product bugs.)

@ymahajan ymahajan added the area/ysql Yugabyte SQL (YSQL) label Jun 11, 2021
@hsu880 hsu880 added area/documentation Documentation needed and removed area/ysql Yugabyte SQL (YSQL) labels Jun 11, 2021
@ymahajan ymahajan added this to the 2.7.x milestone Jun 11, 2021
@hsu880
Copy link

hsu880 commented Jun 11, 2021

This looks like a bug in Doc or DB, and definitely not a platform bug.

@polarweasel
Copy link
Contributor

@hsiaosu-yb This is not (just) a doc bug, it's missing functionality in the database. But you're correct that it's definitely not a platform issue.

@polarweasel polarweasel added the area/ysql Yugabyte SQL (YSQL) label Jun 11, 2021
@polarweasel polarweasel assigned polarweasel and m-iancu and unassigned bllewell Jun 11, 2021
@lizayugabyte lizayugabyte added the priority/medium Medium priority issue label Jun 23, 2021
@yugabyte-ci yugabyte-ci added the kind/bug This issue is a bug label Jun 9, 2022
@yugabyte-ci yugabyte-ci removed the area/documentation Documentation needed label Jul 9, 2022
@ddorian ddorian assigned ddorian and unassigned polarweasel May 5, 2023
@ddhodge ddhodge assigned bllewell and unassigned ddorian May 7, 2023
@bllewell
Copy link
Contributor

bllewell commented May 7, 2023

See Issue #10865 «[YSQL] Support for CREATE SCHEMA with elements». It describes the same underlying product bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

9 participants