-
Notifications
You must be signed in to change notification settings - Fork 0
/
help_messages.go
1031 lines (990 loc) · 23.7 KB
/
help_messages.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by help.awk. DO NOT EDIT.
// GENERATED FILE DO NOT EDIT
package parser
var helpMessages = map[string]HelpMessageBody{
//line sql.y: 918
`ALTER`: {
//line sql.y: 919
Category: hGroup,
//line sql.y: 920
Text: `ALTER TABLE, ALTER INDEX, ALTER VIEW, ALTER DATABASE
`,
},
//line sql.y: 928
`ALTER TABLE`: {
ShortDescription: `change the definition of a table`,
//line sql.y: 929
Category: hDDL,
//line sql.y: 930
Text: `
ALTER TABLE [IF EXISTS] <tablename> <command> [, ...]
Commands:
ALTER TABLE ... ADD [COLUMN] [IF NOT EXISTS] <colname> <type> [<qualifiers...>]
ALTER TABLE ... ADD <constraint>
ALTER TABLE ... DROP [COLUMN] [IF EXISTS] <colname> [RESTRICT | CASCADE]
ALTER TABLE ... DROP CONSTRAINT [IF EXISTS] <constraintname> [RESTRICT | CASCADE]
ALTER TABLE ... ALTER [COLUMN] <colname> {SET DEFAULT <expr> | DROP DEFAULT}
ALTER TABLE ... ALTER [COLUMN] <colname> DROP NOT NULL
ALTER TABLE ... RENAME TO <newname>
ALTER TABLE ... RENAME [COLUMN] <colname> TO <newname>
ALTER TABLE ... VALIDATE CONSTRAINT <constraintname>
ALTER TABLE ... SPLIT AT <selectclause>
ALTER TABLE ... SCATTER [ FROM ( <exprs...> ) TO ( <exprs...> ) ]
Column qualifiers:
[CONSTRAINT <constraintname>] {NULL | NOT NULL | UNIQUE | PRIMARY KEY | CHECK (<expr>) | DEFAULT <expr>}
FAMILY <familyname>, CREATE [IF NOT EXISTS] FAMILY [<familyname>]
REFERENCES <tablename> [( <colnames...> )]
COLLATE <collationname>
`,
//line sql.y: 952
SeeAlso: `WEBDOCS/alter-table.html
`,
},
//line sql.y: 963
`ALTER VIEW`: {
ShortDescription: `change the definition of a view`,
//line sql.y: 964
Category: hDDL,
//line sql.y: 965
Text: `
ALTER VIEW [IF EXISTS] <name> RENAME TO <newname>
`,
//line sql.y: 967
SeeAlso: `WEBDOCS/alter-view.html
`,
},
//line sql.y: 974
`ALTER DATABASE`: {
ShortDescription: `change the definition of a database`,
//line sql.y: 975
Category: hDDL,
//line sql.y: 976
Text: `
ALTER DATABASE <name> RENAME TO <newname>
`,
//line sql.y: 978
SeeAlso: `WEBDOCS/alter-database.html
`,
},
//line sql.y: 985
`ALTER INDEX`: {
ShortDescription: `change the definition of an index`,
//line sql.y: 986
Category: hDDL,
//line sql.y: 987
Text: `
ALTER INDEX [IF EXISTS] <idxname> <command>
Commands:
ALTER INDEX ... RENAME TO <newname>
ALTER INDEX ... SPLIT AT <selectclause>
ALTER INDEX ... SCATTER [ FROM ( <exprs...> ) TO ( <exprs...> ) ]
`,
//line sql.y: 995
SeeAlso: `WEBDOCS/alter-index.html
`,
},
//line sql.y: 1205
`BACKUP`: {
ShortDescription: `back up data to external storage`,
//line sql.y: 1206
Category: hCCL,
//line sql.y: 1207
Text: `
BACKUP <targets...> TO <location...>
[ AS OF SYSTEM TIME <expr> ]
[ INCREMENTAL FROM <location...> ]
[ WITH <option> [= <value>] [, ...] ]
Targets:
TABLE <pattern> [, ...]
DATABASE <databasename> [, ...]
Location:
"[scheme]://[host]/[path to backup]?[parameters]"
Options:
INTO_DB
SKIP_MISSING_FOREIGN_KEYS
`,
//line sql.y: 1224
SeeAlso: `RESTORE, WEBDOCS/backup.html
`,
},
//line sql.y: 1232
`RESTORE`: {
ShortDescription: `restore data from external storage`,
//line sql.y: 1233
Category: hCCL,
//line sql.y: 1234
Text: `
RESTORE <targets...> FROM <location...>
[ AS OF SYSTEM TIME <expr> ]
[ WITH <option> [= <value>] [, ...] ]
Targets:
TABLE <pattern> [, ...]
DATABASE <databasename> [, ...]
Locations:
"[scheme]://[host]/[path to backup]?[parameters]"
Options:
INTO_DB
SKIP_MISSING_FOREIGN_KEYS
`,
//line sql.y: 1250
SeeAlso: `BACKUP, WEBDOCS/restore.html
`,
},
//line sql.y: 1264
`IMPORT`: {
ShortDescription: `load data from file in a distributed manner`,
//line sql.y: 1265
Category: hCCL,
//line sql.y: 1266
Text: `
IMPORT TABLE <tablename>
{ ( <elements> ) | CREATE USING <schemafile> }
<format>
DATA ( <datafile> [, ...] )
[ WITH <option> [= <value>] [, ...] ]
Formats:
CSV
Options:
distributed = '...'
sstsize = '...'
temp = '...'
comma = '...' [CSV-specific]
comment = '...' [CSV-specific]
nullif = '...' [CSV-specific]
`,
//line sql.y: 1284
SeeAlso: `CREATE TABLE
`,
},
//line sql.y: 1379
`CANCEL`: {
//line sql.y: 1380
Category: hGroup,
//line sql.y: 1381
Text: `CANCEL JOB, CANCEL QUERY
`,
},
//line sql.y: 1387
`CANCEL JOB`: {
ShortDescription: `cancel a background job`,
//line sql.y: 1388
Category: hMisc,
//line sql.y: 1389
Text: `CANCEL JOB <jobid>
`,
//line sql.y: 1390
SeeAlso: `SHOW JOBS, PAUSE JOBS, RESUME JOB
`,
},
//line sql.y: 1398
`CANCEL QUERY`: {
ShortDescription: `cancel a running query`,
//line sql.y: 1399
Category: hMisc,
//line sql.y: 1400
Text: `CANCEL QUERY <queryid>
`,
//line sql.y: 1401
SeeAlso: `SHOW QUERIES
`,
},
//line sql.y: 1409
`CREATE`: {
//line sql.y: 1410
Category: hGroup,
//line sql.y: 1411
Text: `
CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE TABLE AS,
CREATE USER, CREATE VIEW
`,
},
//line sql.y: 1425
`DELETE`: {
ShortDescription: `delete rows from a table`,
//line sql.y: 1426
Category: hDML,
//line sql.y: 1427
Text: `DELETE FROM <tablename> [WHERE <expr>]
[LIMIT <expr>]
[RETURNING <exprs...>]
`,
//line sql.y: 1430
SeeAlso: `WEBDOCS/delete.html
`,
},
//line sql.y: 1443
`DISCARD`: {
ShortDescription: `reset the session to its initial state`,
//line sql.y: 1444
Category: hCfg,
//line sql.y: 1445
Text: `DISCARD ALL
`,
},
//line sql.y: 1457
`DROP`: {
//line sql.y: 1458
Category: hGroup,
//line sql.y: 1459
Text: `DROP DATABASE, DROP INDEX, DROP TABLE, DROP VIEW, DROP USER
`,
},
//line sql.y: 1468
`DROP VIEW`: {
ShortDescription: `remove a view`,
//line sql.y: 1469
Category: hDDL,
//line sql.y: 1470
Text: `DROP VIEW [IF EXISTS] <tablename> [, ...] [CASCADE | RESTRICT]
`,
//line sql.y: 1471
SeeAlso: `WEBDOCS/drop-index.html
`,
},
//line sql.y: 1483
`DROP TABLE`: {
ShortDescription: `remove a table`,
//line sql.y: 1484
Category: hDDL,
//line sql.y: 1485
Text: `DROP TABLE [IF EXISTS] <tablename> [, ...] [CASCADE | RESTRICT]
`,
//line sql.y: 1486
SeeAlso: `WEBDOCS/drop-table.html
`,
},
//line sql.y: 1498
`DROP INDEX`: {
ShortDescription: `remove an index`,
//line sql.y: 1499
Category: hDDL,
//line sql.y: 1500
Text: `DROP INDEX [IF EXISTS] <idxname> [, ...] [CASCADE | RESTRICT]
`,
//line sql.y: 1501
SeeAlso: `WEBDOCS/drop-index.html
`,
},
//line sql.y: 1521
`DROP DATABASE`: {
ShortDescription: `remove a database`,
//line sql.y: 1522
Category: hDDL,
//line sql.y: 1523
Text: `DROP DATABASE [IF EXISTS] <databasename> [CASCADE | RESTRICT]
`,
//line sql.y: 1524
SeeAlso: `WEBDOCS/drop-database.html
`,
},
//line sql.y: 1544
`DROP USER`: {
ShortDescription: `remove a user`,
//line sql.y: 1545
Category: hPriv,
//line sql.y: 1546
Text: `DROP USER [IF EXISTS] <user> [, ...]
`,
//line sql.y: 1547
SeeAlso: `CREATE USER, SHOW USERS
`,
},
//line sql.y: 1589
`EXPLAIN`: {
ShortDescription: `show the logical plan of a query`,
//line sql.y: 1590
Category: hMisc,
//line sql.y: 1591
Text: `
EXPLAIN <statement>
EXPLAIN [( [PLAN ,] <planoptions...> )] <statement>
Explainable statements:
SELECT, CREATE, DROP, ALTER, INSERT, UPSERT, UPDATE, DELETE,
SHOW, EXPLAIN, EXECUTE
Plan options:
TYPES, EXPRS, METADATA, QUALIFY, INDENT, VERBOSE, DIST_SQL
`,
//line sql.y: 1602
SeeAlso: `WEBDOCS/explain.html
`,
},
//line sql.y: 1660
`PREPARE`: {
ShortDescription: `prepare a statement for later execution`,
//line sql.y: 1661
Category: hMisc,
//line sql.y: 1662
Text: `PREPARE <name> [ ( <types...> ) ] AS <query>
`,
//line sql.y: 1663
SeeAlso: `EXECUTE, DEALLOCATE, DISCARD
`,
},
//line sql.y: 1685
`EXECUTE`: {
ShortDescription: `execute a statement prepared previously`,
//line sql.y: 1686
Category: hMisc,
//line sql.y: 1687
Text: `EXECUTE <name> [ ( <exprs...> ) ]
`,
//line sql.y: 1688
SeeAlso: `PREPARE, DEALLOCATE, DISCARD
`,
},
//line sql.y: 1711
`DEALLOCATE`: {
ShortDescription: `remove a prepared statement`,
//line sql.y: 1712
Category: hMisc,
//line sql.y: 1713
Text: `DEALLOCATE [PREPARE] { <name> | ALL }
`,
//line sql.y: 1714
SeeAlso: `PREPARE, EXECUTE, DISCARD
`,
},
//line sql.y: 1734
`GRANT`: {
ShortDescription: `define access privileges`,
//line sql.y: 1735
Category: hPriv,
//line sql.y: 1736
Text: `
GRANT {ALL | <privileges...> } ON <targets...> TO <grantees...>
Privileges:
CREATE, DROP, GRANT, SELECT, INSERT, DELETE, UPDATE
Targets:
DATABASE <databasename> [, ...]
[TABLE] [<databasename> .] { <tablename> | * } [, ...]
`,
//line sql.y: 1746
SeeAlso: `REVOKE, WEBDOCS/grant.html
`,
},
//line sql.y: 1754
`REVOKE`: {
ShortDescription: `remove access privileges`,
//line sql.y: 1755
Category: hPriv,
//line sql.y: 1756
Text: `
REVOKE {ALL | <privileges...> } ON <targets...> FROM <grantees...>
Privileges:
CREATE, DROP, GRANT, SELECT, INSERT, DELETE, UPDATE
Targets:
DATABASE <databasename> [, <databasename>]...
[TABLE] [<databasename> .] { <tablename> | * } [, ...]
`,
//line sql.y: 1766
SeeAlso: `GRANT, WEBDOCS/revoke.html
`,
},
//line sql.y: 1853
`RESET`: {
ShortDescription: `reset a session variable to its default value`,
//line sql.y: 1854
Category: hCfg,
//line sql.y: 1855
Text: `RESET [SESSION] <var>
`,
//line sql.y: 1856
SeeAlso: `RESET CLUSTER SETTING, WEBDOCS/set-vars.html
`,
},
//line sql.y: 1868
`RESET CLUSTER SETTING`: {
ShortDescription: `reset a cluster setting to its default value`,
//line sql.y: 1869
Category: hCfg,
//line sql.y: 1870
Text: `RESET CLUSTER SETTING <var>
`,
//line sql.y: 1871
SeeAlso: `SET CLUSTER SETTING, RESET
`,
},
//line sql.y: 1897
`SET CLUSTER SETTING`: {
ShortDescription: `change a cluster setting`,
//line sql.y: 1898
Category: hCfg,
//line sql.y: 1899
Text: `SET CLUSTER SETTING <var> { TO | = } <value>
`,
//line sql.y: 1900
SeeAlso: `SHOW CLUSTER SETTING, RESET CLUSTER SETTING, SET SESSION,
WEBDOCS/cluster-settings.html
`,
},
//line sql.y: 1921
`SET SESSION`: {
ShortDescription: `change a session variable`,
//line sql.y: 1922
Category: hCfg,
//line sql.y: 1923
Text: `
SET [SESSION] <var> { TO | = } <values...>
SET [SESSION] TIME ZONE <tz>
SET [SESSION] CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { SNAPSHOT | SERIALIZABLE }
`,
//line sql.y: 1928
SeeAlso: `SHOW SESSION, RESET, DISCARD, SHOW, SET CLUSTER SETTING, SET TRANSACTION,
WEBDOCS/set-vars.html
`,
},
//line sql.y: 1945
`SET TRANSACTION`: {
ShortDescription: `configure the transaction settings`,
//line sql.y: 1946
Category: hTxn,
//line sql.y: 1947
Text: `
SET [SESSION] TRANSACTION <txnparameters...>
Transaction parameters:
ISOLATION LEVEL { SNAPSHOT | SERIALIZABLE }
PRIORITY { LOW | NORMAL | HIGH }
`,
//line sql.y: 1954
SeeAlso: `SHOW TRANSACTION, SET SESSION,
WEBDOCS/set-transaction.html
`,
},
//line sql.y: 2093
`SHOW`: {
//line sql.y: 2094
Category: hGroup,
//line sql.y: 2095
Text: `
SHOW SESSION, SHOW CLUSTER SETTING, SHOW DATABASES, SHOW TABLES, SHOW COLUMNS, SHOW INDEXES,
SHOW CONSTRAINTS, SHOW CREATE TABLE, SHOW CREATE VIEW, SHOW USERS, SHOW TRANSACTION, SHOW BACKUP,
SHOW JOBS, SHOW QUERIES, SHOW SESSIONS, SHOW TRACE
`,
},
//line sql.y: 2120
`SHOW SESSION`: {
ShortDescription: `display session variables`,
//line sql.y: 2121
Category: hCfg,
//line sql.y: 2122
Text: `SHOW [SESSION] { <var> | ALL }
`,
//line sql.y: 2123
SeeAlso: `WEBDOCS/show-vars.html
`,
},
//line sql.y: 2144
`SHOW BACKUP`: {
ShortDescription: `list backup contents`,
//line sql.y: 2145
Category: hCCL,
//line sql.y: 2146
Text: `SHOW BACKUP <location>
`,
//line sql.y: 2147
SeeAlso: `WEBDOCS/show-backup.html
`,
},
//line sql.y: 2155
`SHOW CLUSTER SETTING`: {
ShortDescription: `display cluster settings`,
//line sql.y: 2156
Category: hCfg,
//line sql.y: 2157
Text: `
SHOW CLUSTER SETTING <var>
SHOW ALL CLUSTER SETTINGS
`,
//line sql.y: 2160
SeeAlso: `WEBDOCS/cluster-settings.html
`,
},
//line sql.y: 2177
`SHOW COLUMNS`: {
ShortDescription: `list columns in relation`,
//line sql.y: 2178
Category: hDDL,
//line sql.y: 2179
Text: `SHOW COLUMNS FROM <tablename>
`,
//line sql.y: 2180
SeeAlso: `WEBDOCS/show-columns.html
`,
},
//line sql.y: 2188
`SHOW DATABASES`: {
ShortDescription: `list databases`,
//line sql.y: 2189
Category: hDDL,
//line sql.y: 2190
Text: `SHOW DATABASES
`,
//line sql.y: 2191
SeeAlso: `WEBDOCS/show-databases.html
`,
},
//line sql.y: 2199
`SHOW GRANTS`: {
ShortDescription: `list grants`,
//line sql.y: 2200
Category: hPriv,
//line sql.y: 2201
Text: `SHOW GRANTS [ON <targets...>] [FOR <users...>]
`,
//line sql.y: 2202
SeeAlso: `WEBDOCS/show-grants.html
`,
},
//line sql.y: 2210
`SHOW INDEXES`: {
ShortDescription: `list indexes`,
//line sql.y: 2211
Category: hDDL,
//line sql.y: 2212
Text: `SHOW INDEXES FROM <tablename>
`,
//line sql.y: 2213
SeeAlso: `WEBDOCS/show-index.html
`,
},
//line sql.y: 2231
`SHOW CONSTRAINTS`: {
ShortDescription: `list constraints`,
//line sql.y: 2232
Category: hDDL,
//line sql.y: 2233
Text: `SHOW CONSTRAINTS FROM <tablename>
`,
//line sql.y: 2234
SeeAlso: `WEBDOCS/show-constraints.html
`,
},
//line sql.y: 2247
`SHOW QUERIES`: {
ShortDescription: `list running queries`,
//line sql.y: 2248
Category: hMisc,
//line sql.y: 2249
Text: `SHOW [CLUSTER | LOCAL] QUERIES
`,
//line sql.y: 2250
SeeAlso: `CANCEL QUERY
`,
},
//line sql.y: 2266
`SHOW JOBS`: {
ShortDescription: `list background jobs`,
//line sql.y: 2267
Category: hMisc,
//line sql.y: 2268
Text: `SHOW JOBS
`,
//line sql.y: 2269
SeeAlso: `CANCEL JOB, PAUSE JOB, RESUME JOB
`,
},
//line sql.y: 2277
`SHOW TRACE`: {
ShortDescription: `display an execution trace`,
//line sql.y: 2278
Category: hMisc,
//line sql.y: 2279
Text: `
SHOW [KV] TRACE FOR SESSION
SHOW [KV] TRACE FOR <statement>
`,
//line sql.y: 2282
SeeAlso: `EXPLAIN
`,
},
//line sql.y: 2303
`SHOW SESSIONS`: {
ShortDescription: `list open client sessions`,
//line sql.y: 2304
Category: hMisc,
//line sql.y: 2305
Text: `SHOW [CLUSTER | LOCAL] SESSIONS
`,
},
//line sql.y: 2321
`SHOW TABLES`: {
ShortDescription: `list tables`,
//line sql.y: 2322
Category: hDDL,
//line sql.y: 2323
Text: `SHOW TABLES [FROM <databasename>]
`,
//line sql.y: 2324
SeeAlso: `WEBDOCS/show-tables.html
`,
},
//line sql.y: 2336
`SHOW TRANSACTION`: {
ShortDescription: `display current transaction properties`,
//line sql.y: 2337
Category: hCfg,
//line sql.y: 2338
Text: `SHOW TRANSACTION {ISOLATION LEVEL | PRIORITY | STATUS}
`,
//line sql.y: 2339
SeeAlso: `WEBDOCS/show-transaction.html
`,
},
//line sql.y: 2358
`SHOW CREATE TABLE`: {
ShortDescription: `display the CREATE TABLE statement for a table`,
//line sql.y: 2359
Category: hDDL,
//line sql.y: 2360
Text: `SHOW CREATE TABLE <tablename>
`,
//line sql.y: 2361
SeeAlso: `WEBDOCS/show-create-table.html
`,
},
//line sql.y: 2369
`SHOW CREATE VIEW`: {
ShortDescription: `display the CREATE VIEW statement for a view`,
//line sql.y: 2370
Category: hDDL,
//line sql.y: 2371
Text: `SHOW CREATE VIEW <viewname>
`,
//line sql.y: 2372
SeeAlso: `WEBDOCS/show-create-view.html
`,
},
//line sql.y: 2380
`SHOW USERS`: {
ShortDescription: `list defined users`,
//line sql.y: 2381
Category: hPriv,
//line sql.y: 2382
Text: `SHOW USERS
`,
//line sql.y: 2383
SeeAlso: `CREATE USER, DROP USER, WEBDOCS/show-users.html
`,
},
//line sql.y: 2429
`PAUSE JOB`: {
ShortDescription: `pause a background job`,
//line sql.y: 2430
Category: hMisc,
//line sql.y: 2431
Text: `PAUSE JOB <jobid>
`,
//line sql.y: 2432
SeeAlso: `SHOW JOBS, CANCEL JOB, RESUME JOB
`,
},
//line sql.y: 2440
`CREATE TABLE`: {
ShortDescription: `create a new table`,
//line sql.y: 2441
Category: hDDL,
//line sql.y: 2442
Text: `
CREATE TABLE [IF NOT EXISTS] <tablename> ( <elements...> ) [<interleave>]
CREATE TABLE [IF NOT EXISTS] <tablename> [( <colnames...> )] AS <source>
Table elements:
<name> <type> [<qualifiers...>]
[UNIQUE] INDEX [<name>] ( <colname> [ASC | DESC] [, ...] )
[STORING ( <colnames...> )] [<interleave>]
FAMILY [<name>] ( <colnames...> )
[CONSTRAINT <name>] <constraint>
Table constraints:
PRIMARY KEY ( <colnames...> )
FOREIGN KEY ( <colnames...> ) REFERENCES <tablename> [( <colnames...> )]
UNIQUE ( <colnames... ) [STORING ( <colnames...> )] [<interleave>]
CHECK ( <expr> )
Column qualifiers:
[CONSTRAINT <constraintname>] {NULL | NOT NULL | UNIQUE | PRIMARY KEY | CHECK (<expr>) | DEFAULT <expr>}
FAMILY <familyname>, CREATE [IF NOT EXISTS] FAMILY [<familyname>]
REFERENCES <tablename> [( <colnames...> )]
COLLATE <collationname>
Interleave clause:
INTERLEAVE IN PARENT <tablename> ( <colnames...> ) [CASCADE | RESTRICT]
`,
//line sql.y: 2468
SeeAlso: `SHOW TABLES, CREATE VIEW, SHOW CREATE TABLE,
WEBDOCS/create-table.html
WEBDOCS/create-table-as.html
`,
},
//line sql.y: 2802
`TRUNCATE`: {
ShortDescription: `empty one or more tables`,
//line sql.y: 2803
Category: hDML,
//line sql.y: 2804
Text: `TRUNCATE [TABLE] <tablename> [, ...] [CASCADE | RESTRICT]
`,
//line sql.y: 2805
SeeAlso: `WEBDOCS/truncate.html
`,
},
//line sql.y: 2813
`CREATE USER`: {
ShortDescription: `define a new user`,
//line sql.y: 2814
Category: hPriv,
//line sql.y: 2815
Text: `CREATE USER <name> [ [WITH] PASSWORD <passwd> ]
`,
//line sql.y: 2816
SeeAlso: `DROP USER, SHOW USERS, WEBDOCS/create-user.html
`,
},
//line sql.y: 2834
`CREATE VIEW`: {
ShortDescription: `create a new view`,
//line sql.y: 2835
Category: hDDL,
//line sql.y: 2836
Text: `CREATE VIEW <viewname> [( <colnames...> )] AS <source>
`,
//line sql.y: 2837
SeeAlso: `CREATE TABLE, SHOW CREATE VIEW, WEBDOCS/create-view.html
`,
},
//line sql.y: 2851
`CREATE INDEX`: {
ShortDescription: `create a new index`,
//line sql.y: 2852
Category: hDDL,
//line sql.y: 2853
Text: `
CREATE [UNIQUE] INDEX [IF NOT EXISTS] [<idxname>]
ON <tablename> ( <colname> [ASC | DESC] [, ...] )
[STORING ( <colnames...> )] [<interleave>]
Interleave clause:
INTERLEAVE IN PARENT <tablename> ( <colnames...> ) [CASCADE | RESTRICT]
`,
//line sql.y: 2861
SeeAlso: `CREATE TABLE, SHOW INDEXES, SHOW CREATE INDEX,
WEBDOCS/create-index.html
`,
},
//line sql.y: 3000
`RELEASE`: {
ShortDescription: `complete a retryable block`,
//line sql.y: 3001
Category: hTxn,
//line sql.y: 3002
Text: `RELEASE [SAVEPOINT] cockroach_restart
`,
//line sql.y: 3003
SeeAlso: `SAVEPOINT, WEBDOCS/savepoint.html
`,
},
//line sql.y: 3011
`RESUME JOB`: {
ShortDescription: `resume a background job`,
//line sql.y: 3012
Category: hMisc,
//line sql.y: 3013
Text: `RESUME JOB <jobid>
`,
//line sql.y: 3014
SeeAlso: `SHOW JOBS, CANCEL JOB, PAUSE JOB
`,
},
//line sql.y: 3022
`SAVEPOINT`: {
ShortDescription: `start a retryable block`,
//line sql.y: 3023
Category: hTxn,
//line sql.y: 3024
Text: `SAVEPOINT cockroach_restart
`,
//line sql.y: 3025
SeeAlso: `RELEASE, WEBDOCS/savepoint.html
`,
},
//line sql.y: 3039
`BEGIN`: {
ShortDescription: `start a transaction`,
//line sql.y: 3040
Category: hTxn,
//line sql.y: 3041
Text: `
BEGIN [TRANSACTION] [ <txnparameter> [[,] ...] ]
START TRANSACTION [ <txnparameter> [[,] ...] ]
Transaction parameters:
ISOLATION LEVEL { SNAPSHOT | SERIALIZABLE }
PRIORITY { LOW | NORMAL | HIGH }
`,
//line sql.y: 3049
SeeAlso: `COMMIT, ROLLBACK, WEBDOCS/begin-transaction.html
`,
},
//line sql.y: 3062
`COMMIT`: {
ShortDescription: `commit the current transaction`,
//line sql.y: 3063
Category: hTxn,
//line sql.y: 3064
Text: `
COMMIT [TRANSACTION]
END [TRANSACTION]
`,
//line sql.y: 3067
SeeAlso: `BEGIN, ROLLBACK, WEBDOCS/commit-transaction.html
`,
},
//line sql.y: 3080
`ROLLBACK`: {
ShortDescription: `abort the current transaction`,
//line sql.y: 3081
Category: hTxn,
//line sql.y: 3082
Text: `ROLLBACK [TRANSACTION] [TO [SAVEPOINT] cockroach_restart]
`,
//line sql.y: 3083
SeeAlso: `BEGIN, COMMIT, SAVEPOINT, WEBDOCS/rollback-transaction.html
`,
},
//line sql.y: 3197
`CREATE DATABASE`: {
ShortDescription: `create a new database`,
//line sql.y: 3198
Category: hDDL,
//line sql.y: 3199
Text: `CREATE DATABASE [IF NOT EXISTS] <name>
`,
//line sql.y: 3200
SeeAlso: `WEBDOCS/create-database.html
`,
},
//line sql.y: 3269
`INSERT`: {
ShortDescription: `create new rows in a table`,
//line sql.y: 3270
Category: hDML,
//line sql.y: 3271
Text: `
INSERT INTO <tablename> [[AS] <name>] [( <colnames...> )]
<selectclause>
[ON CONFLICT [( <colnames...> )] {DO UPDATE SET ... [WHERE <expr>] | DO NOTHING}]
[RETURNING <exprs...>]
`,
//line sql.y: 3276
SeeAlso: `UPSERT, UPDATE, DELETE, WEBDOCS/insert.html
`,
},
//line sql.y: 3293
`UPSERT`: {
ShortDescription: `create or replace rows in a table`,
//line sql.y: 3294
Category: hDML,
//line sql.y: 3295
Text: `
UPSERT INTO <tablename> [AS <name>] [( <colnames...> )]
<selectclause>
[RETURNING <exprs...>]
`,
//line sql.y: 3299
SeeAlso: `INSERT, UPDATE, DELETE, WEBDOCS/upsert.html
`,
},
//line sql.y: 3375
`UPDATE`: {
ShortDescription: `update rows of a table`,
//line sql.y: 3376
Category: hDML,
//line sql.y: 3377
Text: `UPDATE <tablename> [[AS] <name>] SET ... [WHERE <expr>] [RETURNING <exprs...>]
`,
//line sql.y: 3378
SeeAlso: `INSERT, UPSERT, DELETE, WEBDOCS/update.html
`,
},
//line sql.y: 3546
`<SELECTCLAUSE>`: {
ShortDescription: `access tabular data`,
//line sql.y: 3547
Category: hDML,
//line sql.y: 3548
Text: `
Select clause:
TABLE <tablename>
VALUES ( <exprs...> ) [ , ... ]
SELECT ... [ { INTERSECT | UNION | EXCEPT } [ ALL | DISTINCT ] <selectclause> ]
`,
},
//line sql.y: 3559
`SELECT`: {
ShortDescription: `retrieve rows from a data source and compute a result`,
//line sql.y: 3560
Category: hDML,
//line sql.y: 3561
Text: `
SELECT [DISTINCT]
{ <expr> [[AS] <name>] | [ [<dbname>.] <tablename>. ] * } [, ...]
[ FROM <source> ]
[ WHERE <expr> ]
[ GROUP BY <expr> [ , ... ] ]
[ HAVING <expr> ]
[ WINDOW <name> AS ( <definition> ) ]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <selectclause> ]
[ ORDER BY <expr> [ ASC | DESC ] [, ...] ]
[ LIMIT { <expr> | ALL } ]
[ OFFSET <expr> [ ROW | ROWS ] ]
`,
//line sql.y: 3573
SeeAlso: `WEBDOCS/select.html
`,
},
//line sql.y: 3633
`TABLE`: {
ShortDescription: `select an entire table`,
//line sql.y: 3634
Category: hDML,
//line sql.y: 3635
Text: `TABLE <tablename>
`,
//line sql.y: 3636
SeeAlso: `SELECT, VALUES, WEBDOCS/table-expressions.html
`,
},
//line sql.y: 3879
`VALUES`: {
ShortDescription: `select a given set of values`,
//line sql.y: 3880
Category: hDML,
//line sql.y: 3881
Text: `VALUES ( <exprs...> ) [, ...]
`,
//line sql.y: 3882
SeeAlso: `SELECT, TABLE, WEBDOCS/table-expressions.html
`,