/*
 * *** Do not change this file by hand. It is automatically
 * *** generated from the DocBook documentation.
 *
 * generated by
 *     /usr/bin/perl create_help.pl ../../../doc/src/sgml/ref sql_help.h
 *
 */

#ifndef SQL_HELP_H
#define SQL_HELP_H

struct _helpStruct
{
    char	   *cmd;	   /* the command name */
    char	   *help;	   /* the help associated with it */
    char	   *syntax;	   /* the syntax associated with it */
};


static struct _helpStruct QL_HELP[] = {
    { "ABORT",
      "abort the current transaction",
      "ABORT [ WORK | TRANSACTION ]" },

    { "ALTER GROUP",
      "add users to a group or remove users from a group",
      "ALTER GROUP name ADD USER username [, ... ]\nALTER GROUP name DROP USER username [, ... ]" },

    { "ALTER TABLE",
      "change the definition of a table",
      "ALTER TABLE [ ONLY ] table [ * ]\n    ADD [ COLUMN ] column type [ column_constraint [ ... ] ]\nALTER TABLE [ ONLY ] table [ * ]\n    ALTER [ COLUMN ] column { SET DEFAULT value | DROP DEFAULT }\nALTER TABLE [ ONLY ] table [ * ]\n    ALTER [ COLUMN ] column SET STATISTICS integer\nALTER TABLE [ ONLY ] table [ * ]\n    RENAME [ COLUMN ] column TO newcolumn\nALTER TABLE table\n    RENAME TO newtable\nALTER TABLE table\n    ADD table constraint definition\nALTER TABLE [ ONLY ] table \n	DROP CONSTRAINT constraint { RESTRICT | CASCADE }\nALTER TABLE table\n	OWNER TO new owner" },

    { "ALTER USER",
      "change a database user account",
      "ALTER USER username [ [ WITH ] option [ ... ] ]\n\nwhere option can be:\n\n	  [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' \n        | CREATEDB | NOCREATEDB\n        | CREATEUSER | NOCREATEUSER \n        | VALID UNTIL 'abstime'" },

    { "ANALYZE",
      "collect statistics about a database",
      "ANALYZE [ VERBOSE ] [ table [ (column [, ...] ) ] ]" },

    { "BEGIN",
      "start a transaction block",
      "BEGIN [ WORK | TRANSACTION ]" },

    { "CHECKPOINT",
      "force a transaction log checkpoint",
      "CHECKPOINT" },

    { "CLOSE",
      "close a cursor",
      "CLOSE cursor" },

    { "CLUSTER",
      "cluster a table according to an index",
      "CLUSTER indexname ON tablename" },

    { "COMMENT",
      "define or change the comment of an object",
      "COMMENT ON\n[\n  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] object_name |\n  COLUMN table_name.column_name |\n  AGGREGATE agg_name (agg_type) |\n  FUNCTION func_name (arg1, arg2, ...) |\n  OPERATOR op (leftoperand_type rightoperand_type) |\n  TRIGGER trigger_name ON table_name\n] IS 'text'" },

    { "COMMIT",
      "commit the current transaction",
      "COMMIT [ WORK | TRANSACTION ]" },

    { "COPY",
      "copy data between files and tables",
      "COPY [ BINARY ] table [ WITH OIDS ]\n    FROM { 'filename' | stdin }\n    [ [USING] DELIMITERS 'delimiter' ]\n    [ WITH NULL AS 'null string' ]\nCOPY [ BINARY ] table [ WITH OIDS ]\n    TO { 'filename' | stdout }\n    [ [USING] DELIMITERS 'delimiter' ]\n    [ WITH NULL AS 'null string' ]" },

    { "CREATE AGGREGATE",
      "define a new aggregate function",
      "CREATE AGGREGATE name ( BASETYPE = input_data_type,\n    SFUNC = sfunc, STYPE = state_type\n    [ , FINALFUNC = ffunc ]\n    [ , INITCOND = initial_condition ] )" },

    { "CREATE CONSTRAINT TRIGGER",
      "define a new constraint trigger",
      "CREATE CONSTRAINT TRIGGER name\n    AFTER events ON\n    relation constraint attributes\n    FOR EACH ROW EXECUTE PROCEDURE func '(' args ')'" },

    { "CREATE DATABASE",
      "create a new database",
      "CREATE DATABASE name\n    [ WITH [ LOCATION = 'dbpath' ]\n           [ TEMPLATE = template ]\n           [ ENCODING = encoding ] ]" },

    { "CREATE FUNCTION",
      "define a new function",
      "CREATE [ OR REPLACE ] FUNCTION name ( [ argtype [, ...] ] )\n    RETURNS rettype\n    AS 'definition'\n    LANGUAGE langname\n    [ WITH ( attribute [, ...] ) ]\nCREATE [ OR REPLACE ] FUNCTION name ( [ argtype [, ...] ] )\n    RETURNS rettype\n    AS 'obj_file', 'link_symbol'\n    LANGUAGE langname\n    [ WITH ( attribute [, ...] ) ]" },

    { "CREATE GROUP",
      "define a new user group",
      "CREATE GROUP name [ [ WITH ] option [ ... ] ]\n\nwhere option can be:\n\n     SYSID gid\n   | USER  username [, ...]" },

    { "CREATE INDEX",
      "define a new index",
      "CREATE [ UNIQUE ] INDEX index_name ON table\n    [ USING acc_method ] ( column [ ops_name ] [, ...] )\n    [ WHERE predicate ]\nCREATE [ UNIQUE ] INDEX index_name ON table\n    [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )\n    [ WHERE predicate ]" },

    { "CREATE LANGUAGE",
      "define a new procedural language",
      "CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE langname\n    HANDLER call_handler" },

    { "CREATE OPERATOR",
      "define a new operator",
      "CREATE OPERATOR name ( PROCEDURE = func_name\n     [, LEFTARG = lefttype\n     ] [, RIGHTARG = righttype ]\n     [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ]\n     [, RESTRICT = res_proc ] [, JOIN = join_proc ]\n     [, HASHES ] [, SORT1 = left_sort_op ] [, SORT2 = right_sort_op ] )" },

    { "CREATE RULE",
      "define a new rewrite rule",
      "CREATE RULE name AS ON event\n    TO object [ WHERE condition ]\n    DO [ INSTEAD ] action\n\nwhere action can be:\n\nNOTHING\n|\nquery\n|\n( query ; query ... )\n|\n[ query ; query ... ]" },

    { "CREATE SEQUENCE",
      "define a new sequence generator",
      "CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname [ INCREMENT increment ]\n    [ MINVALUE minvalue ] [ MAXVALUE maxvalue ]\n    [ START start ] [ CACHE cache ] [ CYCLE ]" },

    { "CREATE TABLE",
      "define a new table",
      "CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (\n    { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ]\n    | table_constraint }  [, ... ]\n)\n[ INHERITS ( parent_table [, ... ] ) ]\n[ WITH OIDS | WITHOUT OIDS ]\n\nwhere column_constraint is:\n\n[ CONSTRAINT constraint_name ]\n{ NOT NULL | NULL | UNIQUE | PRIMARY KEY |\n  CHECK (expression) |\n  REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]\n    [ ON DELETE action ] [ ON UPDATE action ] }\n[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]\n\nand table_constraint is:\n\n[ CONSTRAINT constraint_name ]\n{ UNIQUE ( column_name [, ... ] ) |\n  PRIMARY KEY ( column_name [, ... ] ) |\n  CHECK ( expression ) |\n  FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]\n    [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] }\n[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]" },

    { "CREATE TABLE AS",
      "create a new table from the results of a query",
      "CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name [ (column_name [, ...] ) ]\n    AS query" },

    { "CREATE TRIGGER",
      "define a new trigger",
      "CREATE TRIGGER name { BEFORE | AFTER } { event [OR ...] }\n    ON table FOR EACH { ROW | STATEMENT }\n    EXECUTE PROCEDURE func ( arguments )" },

    { "CREATE TYPE",
      "define a new data type",
      "CREATE TYPE typename ( INPUT = input_function, OUTPUT = output_function\n      , INTERNALLENGTH = { internallength | VARIABLE }\n    [ , EXTERNALLENGTH = { externallength | VARIABLE } ]\n    [ , DEFAULT = default ]\n    [ , ELEMENT = element ] [ , DELIMITER = delimiter ]\n    [ , SEND = send_function ] [ , RECEIVE = receive_function ]\n    [ , PASSEDBYVALUE ]\n    [ , ALIGNMENT = alignment ]\n    [ , STORAGE = storage ]\n)" },

    { "CREATE USER",
      "define a new database user account",
      "CREATE USER username [ [ WITH ] option [ ... ] ]\n\nwhere option can be:\n    \n	  SYSID uid \n        | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'\n        | CREATEDB | NOCREATEDB\n        | CREATEUSER | NOCREATEUSER\n        | IN GROUP groupname [, ...]\n        | VALID UNTIL 'abstime'" },

    { "CREATE VIEW",
      "define a new view",
      "CREATE VIEW view [ ( column name list ) ] AS SELECT query" },

    { "DECLARE",
      "define a cursor",
      "DECLARE cursorname [ BINARY ] [ INSENSITIVE ] [ SCROLL ]\n    CURSOR FOR query\n    [ FOR { READ ONLY | UPDATE [ OF column [, ...] ] ]" },

    { "DELETE",
      "delete rows of a table",
      "DELETE FROM [ ONLY ] table [ WHERE condition ]" },

    { "DROP AGGREGATE",
      "remove a user-defined aggregate function",
      "DROP AGGREGATE name ( type )" },

    { "DROP DATABASE",
      "remove a database",
      "DROP DATABASE name" },

    { "DROP FUNCTION",
      "remove a user-defined function",
      "DROP FUNCTION name ( [ type [, ...] ] )" },

    { "DROP GROUP",
      "remove a user group",
      "DROP GROUP name" },

    { "DROP INDEX",
      "remove an index",
      "DROP INDEX index_name [, ...]" },

    { "DROP LANGUAGE",
      "remove a user-defined procedural language",
      "DROP [ PROCEDURAL ] LANGUAGE name" },

    { "DROP OPERATOR",
      "remove a user-defined operator",
      "DROP OPERATOR id ( lefttype | NONE , righttype | NONE )" },

    { "DROP RULE",
      "remove a rewrite rule",
      "DROP RULE name [, ...]" },

    { "DROP SEQUENCE",
      "remove a sequence",
      "DROP SEQUENCE name [, ...]" },

    { "DROP TABLE",
      "remove a table",
      "DROP TABLE name [, ...]" },

    { "DROP TRIGGER",
      "remove a trigger",
      "DROP TRIGGER name ON table" },

    { "DROP TYPE",
      "remove a user-defined data type",
      "DROP TYPE typename [, ...]" },

    { "DROP USER",
      "remove a database user account",
      "DROP USER name" },

    { "DROP VIEW",
      "remove a view",
      "DROP VIEW name [, ...]" },

    { "END",
      "commit the current transaction",
      "END [ WORK | TRANSACTION ]" },

    { "EXPLAIN",
      "show the execution plan of a statement",
      "EXPLAIN [ ANALYZE ] [ VERBOSE ] query" },

    { "FETCH",
      "retrieve rows from a table using a cursor",
      "FETCH [ direction ] [ count ] { IN | FROM } cursor\nFETCH [ FORWARD | BACKWARD | RELATIVE ] [ # | ALL | NEXT | PRIOR ] { IN | FROM } cursor" },

    { "GRANT",
      "define access privileges",
      "GRANT { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER } [,...] | ALL [ PRIVILEGES ] }\n    ON [ TABLE ] objectname [, ...]\n    TO { username | GROUP groupname | PUBLIC } [, ...]" },

    { "INSERT",
      "create new rows in a table",
      "INSERT INTO table [ ( column [, ...] ) ]\n    { DEFAULT VALUES | VALUES ( expression [, ...] ) | SELECT query }" },

    { "LISTEN",
      "listen for a notification",
      "LISTEN name" },

    { "LOAD",
      "load or reload a shared library file",
      "LOAD 'filename'" },

    { "LOCK",
      "explicitly lock a table",
      "LOCK [ TABLE ] name [, ...]\nLOCK [ TABLE ] name [, ...] IN lockmode MODE\n\nwhere lockmode is one of:\n\n	ACCESS SHARE | ROW SHARE | ROW EXCLUSIVE | SHARE UPDATE EXCLUSIVE |\n	SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE | ACCESS EXCLUSIVE" },

    { "MOVE",
      "position a cursor on a specified row of a table",
      "MOVE [ direction ] [ count ] \n    { IN | FROM } cursor" },

    { "NOTIFY",
      "generate a notification",
      "NOTIFY name" },

    { "REINDEX",
      "rebuild corrupted indexes",
      "REINDEX { TABLE | DATABASE | INDEX } name [ FORCE ]" },

    { "RESET",
      "restore the value of a run-time parameter to a default value",
      "RESET variable" },

    { "REVOKE",
      "remove access privileges",
      "REVOKE { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER } [,...] | ALL [ PRIVILEGES ] }\n    ON [ TABLE ] object [, ...]\n    FROM { username | GROUP groupname | PUBLIC } [, ...]" },

    { "ROLLBACK",
      "abort the current transaction",
      "ROLLBACK [ WORK | TRANSACTION ]" },

    { "SELECT",
      "retrieve rows from a table or view",
      "SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]\n    * | expression [ AS output_name ] [, ...]\n    [ FROM from_item [, ...] ]\n    [ WHERE condition ]\n    [ GROUP BY expression [, ...] ]\n    [ HAVING condition [, ...] ]\n    [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]\n    [ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ]\n    [ FOR UPDATE [ OF tablename [, ...] ] ]\n    [ LIMIT { count | ALL } ]\n    [ OFFSET start ]\n\nwhere from_item can be:\n\n[ ONLY ] table_name [ * ]\n    [ [ AS ] alias [ ( column_alias_list ) ] ]\n|\n( select )\n    [ AS ] alias [ ( column_alias_list ) ]\n|\nfrom_item [ NATURAL ] join_type from_item\n    [ ON join_condition | USING ( join_column_list ) ]" },

    { "SELECT INTO",
      "create a new table from the results of a query",
      "SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]\n    * | expression [ AS output_name ] [, ...]\n    INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table\n    [ FROM from_item [, ...] ]\n    [ WHERE condition ]\n    [ GROUP BY expression [, ...] ]\n    [ HAVING condition [, ...] ]\n    [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]\n    [ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ]\n    [ FOR UPDATE [ OF tablename [, ...] ] ]\n    [ LIMIT [ start , ] { count | ALL } ]\n    [ OFFSET start ]\n\nwhere from_item can be:\n\n[ ONLY ] table_name [ * ]\n    [ [ AS ] alias [ ( column_alias_list ) ] ]\n|\n( select )\n    [ AS ] alias [ ( column_alias_list ) ]\n|\nfrom_item [ NATURAL ] join_type from_item\n    [ ON join_condition | USING ( join_column_list ) ]" },

    { "SET",
      "change a run-time parameter",
      "SET variable { TO | = } { value | 'value' | DEFAULT }\nSET TIME ZONE { 'timezone' | LOCAL | DEFAULT }" },

    { "SET CONSTRAINTS",
      "set the constraint mode of the current transaction",
      "SET CONSTRAINTS { ALL | constraint [, ...] } { DEFERRED | IMMEDIATE }" },

    { "SET SESSION AUTHORIZATION",
      "set the session user identifier and the current user identifier of the current session",
      "SET SESSION AUTHORIZATION 'username'" },

    { "SET TRANSACTION",
      "set the characteristics of the current transaction",
      "SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }\nSET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL\n    { READ COMMITTED | SERIALIZABLE }" },

    { "SHOW",
      "show the value of a run-time parameter",
      "SHOW name" },

    { "TRUNCATE",
      "empty a table",
      "TRUNCATE [ TABLE ] name" },

    { "UNLISTEN",
      "stop listening for a notification",
      "UNLISTEN { notifyname | * }" },

    { "UPDATE",
      "update rows of a table",
      "UPDATE [ ONLY ] table SET col = expression [, ...]\n    [ FROM fromlist ]\n    [ WHERE condition ]" },

    { "VACUUM",
      "garbage-collect and optionally analyze a database",
      "VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ table ]\nVACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ table [ (column [, ...] ) ] ]" },


    { NULL, NULL, NULL }    /* End of list marker */
};


#define QL_HELP_COUNT 69


#endif /* SQL_HELP_H */
