Changeset: f098bb5fc63d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f098bb5fc63d
Modified Files:
clients/mapiclient/mhelp.c
Branch: Apr2019
Log Message:
Removed syntax for
"CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
" LANGUAGE ident external_code",
as we do not support this syntax.
Corrected syntax for ALTER USER.
Improved syntax for CREATE LOADER.
Added synopsis to CREATE { AGGREGATE | FUNCTION | PROCEDURE | LOADER | ROLE }
and ALTER USER
Added "See also URL" comments to CREATE { AGGREGATE | FILTER FUNCTION |
FUNCTION | PROCEDURE | LOADER | SCHEMA | TABLE | VIEW | ROLE | USER )
Added "language_keyword" definition to replace ident in: CREATE AGGREGATE ...
LANGUAGE ident ... and CREATE FUNCTION ... LANGUAGE ident ...
Added CURRENT_ROLE, CURRENT_SCHEMA, LOCALTIME.
Corrected LOCAL_TIMESTAMP into LOCALTIMESTAMP.
diffs (274 lines):
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -77,16 +77,15 @@ SQLhelp sqlhelp1[] = {
"ident,data_type",
"See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"},
{"ALTER USER",
- "",
+ "Change a user's login name or password or default schema",
+ "ALTER USER ident RENAME TO ident\n"
+ "ALTER USER SET [ENCRYPTED | UNENCRYPTED] PASSWORD string USING OLD
PASSWORD string\n"
"ALTER USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string\n"
- "ALTER USER ident SET SCHEMA schemaname\n"
- "ALTER USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string SET
SCHEMA schemaname\n"
- "ALTER USER RENAME TO ident\n"
- "ALTER USER SET [ENCRYPTED | UNENCRYPTED] PASSWORD string USING OLD
PASSWORD string",
+ "ALTER USER ident [ WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string ]
SET SCHEMA ident",
"ident",
"See also https://www.monetdb.org/Documentation/SQLreference/Users"},
{"ANALYZE",
- "Collect column data statistics for optimizations",
+ "Collect column/table/schema data statistics for analysis and
optimizer usage",
"ANALYZE ident [ . ident [ column_list ] ] [SAMPLE size] [MINMAX]",
"column_list",
"See also
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics"},
@@ -129,59 +128,59 @@ SQLhelp sqlhelp1[] = {
{"COPY LOADER",
"Copy into using a user supplied parsing function",
"COPY LOADER INTO qname FROM qname '(' [ scalar_expression ... ] ')'",
- "qname",
+ "qname,scalar_expression",
NULL},
{"CREATE AGGREGATE",
- "",
+ "Create a user-defined aggregate function. The body of the aggregate
function\n"
+ "can also be defined in other programming languages such as Python, R,
C or CPP.",
"CREATE [ OR REPLACE ] AGGREGATE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
" RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
" EXTERNAL NAME ident ',' ident\n"
"CREATE [ OR REPLACE ] AGGREGATE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
" RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
- " LANGUAGE ident external_code",
- "qname,param,data_type,function_return,ident",
- NULL},
+ " LANGUAGE language_keyword external_code",
+
"qname,param,data_type,function_return,ident,language_keyword,external_code",
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"},
{"CREATE FILTER FUNCTION",
"",
"CREATE [ OR REPLACE ] FILTER FUNCTION qname '(' { '*' | [ param [','
...]] } ')'\n"
" RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
" EXTERNAL NAME ident ',' ident",
- "param,data_type,function_return",
- NULL},
+ "qname,param,data_type,function_return,ident",
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"},
{"CREATE FUNCTION",
- "",
+ "Create a user-defined function. Besides standard SQL the body of the
function\n"
+ "can also be defined in other programming languages such as Python, R,
C or CPP.",
+ "CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] }
')'\n"
+ " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
+ " BEGIN [ ATOMIC ] statement [ ';' ...] END\n"
"CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] }
')'\n"
" RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
" EXTERNAL NAME ident ',' ident\n"
"CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] }
')'\n"
" RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
- " BEGIN [ ATOMIC ] statement [ ';' ...] END\n"
- "CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] }
')'\n"
- " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n"
- " LANGUAGE ident external_code",
- "param,data_type,function_return,external_code",
- NULL},
+ " LANGUAGE language_keyword external_code",
+
"qname,param,data_type,function_return,statement,ident,language_keyword,external_code",
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"},
{"CREATE INDEX",
"",
"CREATE [ UNIQUE | ORDERED | IMPRINTS ] INDEX ident ON qname '('
ident_list ')'",
NULL,
NULL},
{"CREATE PROCEDURE",
- "",
- "CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
- " EXTERNAL NAME ident ',' ident\n"
+ "Create a user-defined procedure",
"CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
" BEGIN [ ATOMIC ] procedure_statement [ ';' ...] END\n"
"CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]]
} ')'\n"
- " LANGUAGE ident external_code",
- "param,data_type,external_code",
- NULL},
+ " EXTERNAL NAME ident ',' ident",
+ "qname,param,procedure_statement,ident",
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Procedures"},
{"CREATE LOADER",
- "",
+ "Create a custom (external) data loader function. The body is defined
in Python language",
"CREATE [ OR REPLACE ] LOADER qname '(' [ param [',' ...]] ')'\n"
- " LANGUAGE ident external_code",
- "param,data_type,function_return,external_code",
- NULL},
+ " LANGUAGE PYTHON external_code",
+ "qname,param,external_code",
+ "See also
https://www.monetdb.org/blog/monetdbpython-loader-functions"},
{"CREATE MERGE TABLE",
"",
"CREATE MERGE TABLE [ IF NOT EXISTS ] qname table_source [
opt_partition_by ];",
@@ -198,15 +197,16 @@ SQLhelp sqlhelp1[] = {
NULL,
"See also
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/TransactionReplication"},
{"CREATE ROLE",
- "",
+ "Create a new role. You can grant privileges to a role and next\n"
+ "grant a role (or multiple roles) to specific users",
"CREATE ROLE ident [ WITH ADMIN { CURRENT_USER | CURRENT_ROLE } ]",
"ident",
- NULL},
+ "See also https://www.monetdb.org/Documentation/SQLreference/Roles"},
{"CREATE SCHEMA",
"",
"CREATE SCHEMA [ IF NOT EXISTS ] schema_name [default_char_set]
[path_spec] [schema_element]",
"schema_name,default_char_set,path_spec,schema_element",
- NULL},
+ "See also https://www.monetdb.org/Documentation/SQLreference/Schema"},
{"CREATE SEQUENCE",
"Define a new sequence generator",
"CREATE SEQUENCE ident [ AS data_type] [ START [WITH start]]
[INCREMENT BY increment]\n"
@@ -224,13 +224,13 @@ SQLhelp sqlhelp1[] = {
"CREATE TABLE [ IF NOT EXISTS ] qname FROM LOADER function_ref\n"
"CREATE [ LOCAL | GLOBAL ] { TEMPORARY | TEMP } TABLE [ IF NOT EXISTS
] qname table_source [on_commit]",
"table_source,on_commit,function_ref",
- NULL},
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Tables"},
{"CREATE TRIGGER",
"",
"CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER } { INSERT |
DELETE | TRUNCATE ...\n"
" | UPDATE [ OF ident [',' ident]] } ON qname REFERENCING
trigger_reference... triggered_action",
- "trigger_reference,triggered_action",
- NULL},
+ "qname,trigger_reference,triggered_action",
+ "See also
https://www.monetdb.org/Documentation/SQLreference/Triggers"},
{"CREATE TYPE",
"Add user defined type to the type system ",
"CREATE TYPE qname EXTERNAL NAME ident",
@@ -240,26 +240,41 @@ SQLhelp sqlhelp1[] = {
"Create a new user",
"CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME
string SCHEMA ident",
"ident",
- NULL},
+ "See also https://www.monetdb.org/Documentation/SQLreference/Users"},
{"CREATE VIEW",
"",
"CREATE [ OR REPLACE ] VIEW qname [ column_list ] AS {
query_expression | '(' query_expression ')' }\n"
"[ WITH CHECK OPTION ]",
- "column_list,query_expression",
- NULL},
+ "qname,column_list,query_expression",
+ "See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Views"},
{"CURRENT_DATE",
- "Built-in function",
- "CURRENT_DATE [ '(' ')']",
+ "Pseudo column or function to get the current date",
+ "CURRENT_DATE [ '(' ')' ]",
+ NULL,
+ NULL},
+ {"CURRENT_ROLE",
+ "Pseudo column to get the current role name",
+ "CURRENT_ROLE",
+ NULL,
+ NULL},
+ {"CURRENT_SCHEMA",
+ "Pseudo column to get the current schema name",
+ "CURRENT_SCHEMA",
NULL,
NULL},
{"CURRENT_TIME",
- "Built-in function",
- "CURRENT_TIME [ '(' ')']",
+ "Pseudo column or function to get the current time including timezone",
+ "CURRENT_TIME [ '(' ')' ]",
NULL,
NULL},
{"CURRENT_TIMESTAMP",
- "Built-in function",
- "CURRENT_TIMESTAMP [ '(' ')']",
+ "Pseudo column or function to get the current timestamp including
timezone",
+ "CURRENT_TIMESTAMP [ '(' ')' ] | NOW [ '(' ')' ]",
+ NULL,
+ NULL},
+ {"CURRENT_USER",
+ "Pseudo column to get the current user name",
+ "CURRENT_USER | USER",
NULL,
NULL},
{"EXPLAIN",
@@ -267,9 +282,14 @@ SQLhelp sqlhelp1[] = {
"EXPLAIN statement",
NULL,
"See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/Explain"},
- {"LOCAL_TIMESTAMP",
- "Built-in function",
- "LOCAL_TIMESTAMP [ '(' ')']",
+ {"LOCALTIME",
+ "Pseudo column or function to get the current client time excluding
timezone",
+ "LOCALTIME [ '(' ')' ]",
+ NULL,
+ NULL},
+ {"LOCALTIMESTAMP",
+ "Pseudo column or function to get the current client timestamp
excluding timezone",
+ "LOCALTIMESTAMP [ '(' ')' ]",
NULL,
NULL},
{"EXTRACT",
@@ -610,7 +630,8 @@ SQLhelp sqlhelp2[] = {
NULL,
NULL},
{"ident",
- "An identifier",
+ "An identifier. Use double quote's around the identifier name to
include\n"
+ " mixed/upper case letters and/or special characters",
NULL,
NULL,
NULL},
@@ -639,6 +660,11 @@ SQLhelp sqlhelp2[] = {
"READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE",
NULL,
NULL},
+ {"language_keyword",
+ NULL,
+ "C | CPP | R | PYTHON | PYTHON_MAP | PYTHON2 | PYTHON2_MAP | PYTHON3 |
PYTHON3_MAP",
+ NULL,
+ NULL},
{"match_options",
NULL,
"MATCH { FULL | PARTIAL | SIMPLE }",
@@ -704,8 +730,9 @@ SQLhelp sqlhelp2[] = {
NULL},
{"procedure_statement",
NULL,
- "{transaction_statement | update_statement | grant | revoke | declare
| set_statement | control_statement | select_single_row} ';'",
- "transaction_statement | update_statement | grant | revoke | declare |
set_statement | control_statement | select_single_row",
+ "{ transaction_statement | update_statement | grant | revoke |\n"
+ " declare | set_statement | control_statement | select_single_row }
';'",
+
"transaction_statement,update_statement,grant,revoke,declare,set_statement,control_statement,select_single_row",
NULL},
{"query_expression",
NULL,
@@ -724,7 +751,7 @@ SQLhelp sqlhelp2[] = {
NULL},
{"row_values",
NULL,
- "'(' atom [ ',' atom]... ')' [ ',' row_values] ...",
+ "'(' atom [ ',' atom ]... ')' [ ',' row_values ] ...",
"atom",
NULL},
{"schema_name",
@@ -812,12 +839,13 @@ SQLhelp sqlhelp2[] = {
{"triggered_action",
NULL,
"[ FOR EACH { ROW | STATEMENT } ] [ WHEN '(' search_condition ')'\n"
- "BEGIN ATOMIC trigger_statement ... END ",
+ " BEGIN ATOMIC trigger_statement ... END ",
"trigger_statement,search_condition",
NULL},
{"trigger_statement",
NULL,
- "transaction_statement | update_statement | grant | revoke |
declare_statement | set_statement | control_statement | select_single_row",
+ "transaction_statement | update_statement | grant | revoke |
declare_statement |\n"
+ " set_statement | control_statement | select_single_row",
"transaction_statement,update_statement,grant,revoke,declare_statement,set_statement,control_statement,select_single_row",
NULL},
{"when_statement",
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list