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

[YSQL] [DOCS] Update the SQL syntax for the ysqlsh "\h [NAME]" #2218

Open
stevebang opened this issue Sep 4, 2019 · 0 comments
Open

[YSQL] [DOCS] Update the SQL syntax for the ysqlsh "\h [NAME]" #2218

stevebang opened this issue Sep 4, 2019 · 0 comments
Assignees
Labels
area/documentation Documentation needed temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira

Comments

@stevebang
Copy link
Contributor

One of the psql meta-commands, \h, returns command line help for SQL statement syntax. Currently, this is enabled in YugaByte DB in ysqlsh, but returns the help from PostgreSQL, not YugaByte DB. We should update this to reflect YSQL differences and extensions.

I'd also like us to include a link to the documentation page for details.

psql example:

postgres@postgres=#  \h alter table
Command:     ALTER TABLE
Description: change the definition of a table
Syntax:
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
    action [, ... ]
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
    RENAME [ COLUMN ] column_name TO new_column_name
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
    RENAME CONSTRAINT constraint_name TO new_constraint_name
ALTER TABLE [ IF EXISTS ] name
    RENAME TO new_name
ALTER TABLE [ IF EXISTS ] name
    SET SCHEMA new_schema
ALTER TABLE ALL IN TABLESPACE name [ OWNED BY role_name [, ... ] ]
    SET TABLESPACE new_tablespace [ NOWAIT ]
ALTER TABLE [ IF EXISTS ] name
    ATTACH PARTITION partition_name { FOR VALUES partition_bound_spec | DEFAULT }
ALTER TABLE [ IF EXISTS ] name
    DETACH PARTITION partition_name

where action is one of:

    ADD [ COLUMN ] [ IF NOT EXISTS ] column_name data_type [ COLLATE collation ] [
    DROP [ COLUMN ] [ IF EXISTS ] column_name [ RESTRICT | CASCADE ]
@rthallamko3 rthallamko3 added the area/documentation Documentation needed label Dec 29, 2022
@polarweasel polarweasel added the temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira label Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira
Projects
Status: No status
Development

No branches or pull requests

5 participants