Skip to content

Commit 4bec96f

Browse files
committed
Brought psql help up to date with syntax and manual.
1 parent 92210d4 commit 4bec96f

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/bin/psql/psqlHelp.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: psqlHelp.h,v 1.4 1996/10/03 04:20:41 momjian Exp $
8+
* $Id: psqlHelp.h,v 1.5 1996/10/03 15:46:31 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -25,7 +25,7 @@ static struct _helpStruct QL_HELP[] = {
2525
"abort [transaction];"},
2626
{ "alter table",
2727
"add/rename attributes, rename tables",
28-
"alter table <relname> [*] add column <attr> <type>;\n\talter table <relname> [*] rename [column] <attr1> to <attr2>;\n\talter table <relname1> rename to <relname2>"},
28+
"alter table <class_name> [*] add column <attr> <type>;\n\talter table <class_name> [*] rename [column] <attr1> to <attr2>;\n\talter table <class_name1> rename to <class_name2>"},
2929
{ "begin",
3030
"begin a new transaction",
3131
"begin [transaction|work];"},
@@ -39,8 +39,8 @@ static struct _helpStruct QL_HELP[] = {
3939
"create a clustered index (from an existing index)",
4040
"cluster <index_name> on <relation_name>"},
4141
{ "close",
42-
"close an existing cursor (portal)",
43-
"close <portalname>;"},
42+
"close an existing cursor (cursor)",
43+
"close <cursorname>;"},
4444
{ "commit",
4545
"commit a transaction",
4646
"commit [work]"},
@@ -49,7 +49,7 @@ static struct _helpStruct QL_HELP[] = {
4949
"commit [work]"},
5050
{ "copy",
5151
"copy data to and from a table",
52-
"copy [binary] <relname> [with oids]\n\t{to|from} {<filename>|stdin|stdout} [using delimiters <delim>];"},
52+
"copy [binary] <class_name> [with oids]\n\t{to|from} {<filename>|stdin|stdout} [using delimiters <delim>];"},
5353
{ "create",
5454
"Please more be specific:",
5555
"\tcreate aggregate\n\tcreate database\n\tcreate function\n\tcreate index\n\tcreate operator\n\tcreate rule\n\tcreate table\n\tcreate type\n\tcreate view"},
@@ -64,7 +64,7 @@ static struct _helpStruct QL_HELP[] = {
6464
"create function <function_name> ([<type1>,...<typeN>]) returns <return_type>\n\tas '<object_filename>'|'<sql-queries>'\n\tlanguage 'c'|'sql'|'internal';"},
6565
{ "create index",
6666
"construct an index",
67-
"create index <indexname> on <relname> [using <access_method>] (<attr1>|<funcname>(<attr1>,...) [<type_class1>]);"},
67+
"create index <indexname> on <class_name> [using <access_method>] (<attr1>|<funcname>(<attr1>,...) [<type_class1>]);"},
6868
{ "create operator",
6969
"create a user-defined operator",
7070
"create operator <operator_name> (\n\t[leftarg = <type1>][,rightarg = <type2>]\n\t,procedure = <func_name>,\n\t[,commutator = <com_op>][,negator = <neg_op>]\n\t[,restrict = <res_proc>][,hashes]\n\t[,join = <join_proc>][,sort = <sort_op1>...<sort_opN>]);"},
@@ -73,19 +73,19 @@ static struct _helpStruct QL_HELP[] = {
7373
"create rule <rule_name> as on\n\t[select|update|delete|insert]\n\tto <object> [where <qual>]\n\tdo [instead] [<action>|nothing| [<actions>]];"},
7474
{ "create table",
7575
"create a new table",
76-
"create table <relname> ( <attr1> <type1>,... <attrN> <typeN>)\n\t[inherits (<relname1>,...<relnameN>\n\tarchive=<archive_mode>\n\tstore=<smgr_name>\n\tarch_store=<smgr_name>];"},
76+
"create table <class_name> ( <attr1> <type1>,... <attrN> <typeN>)\n\t[inherits (<class_name1>,...<class_nameN>\n\tarchive=<archive_mode>\n\tstore=<smgr_name>\n\tarch_store=<smgr_name>];"},
7777
{ "create type",
7878
"create a new user-defined base data type",
7979
"create type <typename> (\n\tinternallength = (<number> | variable),\n\t[externallength = (<number>|variable),]\n\tinput=<input_function>, output = <output_function>\n\t[,element = <typename>][,delimiter=<character>][,default=\'<string>\']\n\t[,send = <send_function>][,receive = <receive_function>][,passedbyvalue]);"},
8080
{ "create view",
8181
"create a view",
8282
"create view <view_name> as select <expr1>[as <attr1>][,... <exprN>[as <attrN>]] [from <from_list>] [where <qual>];"},
8383
{ "declare",
84-
"set up a cursor (portal)",
85-
"declare <portalname> [binary] cursor for\n\tselect [distinct]\n\t<expr1> [as <attr1>],...<exprN> [as <attrN>]\n\t[from <from_list>] [where <qual>]\n\t[order by <attr1> [using <op1>],... <attrN> [using <opN>]];"},
84+
"set up a cursor",
85+
"declare <cursorname> [binary] cursor for\n\tselect [distinct]\n\t<expr1> [as <attr1>],...<exprN> [as <attrN>]\n\t[from <from_list>] [where <qual>]\n\t[order by <attr1> [using <op1>],... <attrN> [using <opN>]];"},
8686
{ "delete",
8787
"delete tuples",
88-
"delete from <relname> [where <qual>];"},
88+
"delete from <class_name> [where <qual>];"},
8989
{ "drop",
9090
"Please more be specific:",
9191
"\tdrop aggregate\n\tdrop database\n\tdrop function\n\tdrop index\n\tdrop operator\n\tdrop rule\n\tdrop table\n\tdrop type\n\tdrop view"},
@@ -109,7 +109,7 @@ static struct _helpStruct QL_HELP[] = {
109109
"drop rule <rulename>;"},
110110
{ "drop table",
111111
"remove a table",
112-
"drop table <relname>[,...<relnameN];"},
112+
"drop table <class_name>[,...<class_nameN];"},
113113
{ "drop type",
114114
"remove a user-defined base type",
115115
"drop type <typename>;"},
@@ -129,38 +129,38 @@ static struct _helpStruct QL_HELP[] = {
129129
"extend a partial index",
130130
"extend index <indexname> [where <qual>];"},
131131
{ "fetch",
132-
"retrieve tuples from a cursor (portal)",
133-
"fetch [forward|backward] [<number>|all] [in <portalname>];"},
132+
"retrieve tuples from a cursor",
133+
"fetch [forward|backward] [<number>|all] [in <cursorname>];"},
134134
{ "grant",
135135
"grant access control to a user or group",
136136
"grant <privilege[,privilege,...]> on <rel1>[,...<reln>] to \n[public | group <group> | <username>]\n\t privilege is {ALL | SELECT | INSERT | UPDATE | DELETE | RULE}"},
137137
{ "insert",
138138
"insert tuples",
139-
"insert into <relname> [(<attr1>...<attrN>)]\n\t[values (<expr1>...<exprN>); |\n\tselect <expr1>,...<exprN> [from <from_clause>] [where <qual>];"},
139+
"insert into <class_name> [(<attr1>...<attrN>)]\n\t[values (<expr1>...<exprN>); |\n\tselect <expr1>,...<exprN> [from <from_clause>] [where <qual>];"},
140140
{ "listen",
141141
"listen for notification on a relation",
142-
"listen <relname>"},
142+
"listen <class_name>"},
143143
{ "load",
144144
"dynamically load a module",
145145
"load <filename>;"},
146146
{ "notify",
147147
"signal all frontends and backends listening on a relation",
148-
"notify <relname>"},
148+
"notify <class_name>"},
149149
{ "purge",
150150
"purge historical data",
151-
"purge <relname> [before <abstime>] [after <reltime>];"},
151+
"purge <class_name> [before <abstime>] [after <reltime>];"},
152152
{ "revoke",
153153
"revoke access control from a user or group",
154154
"revoke <privilege[,privilege,...]> on <rel1>[,...<reln>] from \n[public | group <group> | <username>]\n\t privilege is {ALL | SELECT | INSERT | UPDATE | DELETE | RULE}"},
155155
{ "rollback",
156156
"abort a transaction",
157-
"rollback [work]"},
157+
"rollback [transaction|work]"},
158158
{ "select",
159159
"retrieve tuples",
160-
"select [distinct on <attr>] <expr1> [as <attr1>], ... <exprN> [as <attrN>]\n\t[into table <relname>] [from <from_list>]\n\t[where <qual>]\n\t[order by <attr1>\n\t\t[using <op1>],..<attrN> [[using <opN>] | ASC | DESC]];" },
160+
"select [distinct on <attr>] <expr1> [as <attr1>], ... <exprN> [as <attrN>]\n\t[into table <class_name>] [from <from_list>]\n\t[where <qual>]\n\t[order by <attr1>\n\t\t[using <op1>],..<attrN> [[using <opN>] | ASC | DESC]];" },
161161
{ "update",
162162
"update tuples",
163-
"update <relname> set <attr1>=<expr1>,...<attrN>=<exprN> [from <from_clause>] [where <qual>];"},
163+
"update <class_name> set <attr1>=<expr1>,...<attrN>=<exprN> [from <from_clause>] [where <qual>];"},
164164
{ "vacuum",
165165
"vacuum the database, i.e. cleans out deleted records, updates statistics",
166166
"vacuum [table];"},

0 commit comments

Comments
 (0)