Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
d8d0aa01
Commit
d8d0aa01
authored
27 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Update psql help syntax to remove <> and uppercaese keywords.
parent
8e2647a1
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/backend/parser/gram.y
+11
-43
11 additions, 43 deletions
src/backend/parser/gram.y
src/bin/psql/psqlHelp.h
+140
-151
140 additions, 151 deletions
src/bin/psql/psqlHelp.h
src/man/create_operator.l
+2
-2
2 additions, 2 deletions
src/man/create_operator.l
src/man/load.l
+3
-3
3 additions, 3 deletions
src/man/load.l
with
156 additions
and
199 deletions
src/backend/parser/gram.y
+
11
−
43
View file @
d8d0aa01
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.1
6
1998/07/2
4
0
3:31:23 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.1
7
1998/07/2
5
0
0:17:28 momjian
Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -175,6 +175,7 @@ Oid param_type(int t); /* used in parse_expr.c */
...
@@ -175,6 +175,7 @@ Oid param_type(int t); /* used in parse_expr.c */
join_using
join_using
%type <boolean> opt_union
%type <boolean> opt_union
%type <boolean> opt_table
%type <boolean> opt_table
%type <boolean> opt_trans
%type <node> position_expr
%type <node> position_expr
%type <list> extract_list, position_list
%type <list> extract_list, position_list
...
@@ -1994,74 +1995,41 @@ ListenStmt: LISTEN relation_name
...
@@ -1994,74 +1995,41 @@ ListenStmt: LISTEN relation_name
*
*
*****************************************************************************/
*****************************************************************************/
TransactionStmt:
ABORT_TRANS
TRANSACTION
TransactionStmt: ABORT_TRANS
opt_trans
{
{
TransactionStmt *n = makeNode(TransactionStmt);
TransactionStmt *n = makeNode(TransactionStmt);
n->command = ABORT_TRANS;
n->command = ABORT_TRANS;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| BEGIN_TRANS
TRANSACTION
| BEGIN_TRANS
opt_trans
{
{
TransactionStmt *n = makeNode(TransactionStmt);
TransactionStmt *n = makeNode(TransactionStmt);
n->command = BEGIN_TRANS;
n->command = BEGIN_TRANS;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| BEGIN_TRANS WORK
| COMMIT opt_trans
{
TransactionStmt *n = makeNode(TransactionStmt);
n->command = BEGIN_TRANS;
$$ = (Node *)n;
}
| COMMIT WORK
{
{
TransactionStmt *n = makeNode(TransactionStmt);
TransactionStmt *n = makeNode(TransactionStmt);
n->command = END_TRANS;
n->command = END_TRANS;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| END_TRANS
TRANSACTION
| END_TRANS
opt_trans
{
{
TransactionStmt *n = makeNode(TransactionStmt);
TransactionStmt *n = makeNode(TransactionStmt);
n->command = END_TRANS;
n->command = END_TRANS;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| ROLLBACK
WORK
| ROLLBACK
opt_trans
{
{
TransactionStmt *n = makeNode(TransactionStmt);
TransactionStmt *n = makeNode(TransactionStmt);
n->command = ABORT_TRANS;
n->command = ABORT_TRANS;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
;
| ABORT_TRANS
opt_trans: WORK { $$ = NULL; }
{
| TRANSACTION { $$ = NULL: }
TransactionStmt *n = makeNode(TransactionStmt);
| /*EMPTY*/ { $$ = NULL; }
n->command = ABORT_TRANS;
$$ = (Node *)n;
}
| BEGIN_TRANS
{
TransactionStmt *n = makeNode(TransactionStmt);
n->command = BEGIN_TRANS;
$$ = (Node *)n;
}
| COMMIT
{
TransactionStmt *n = makeNode(TransactionStmt);
n->command = END_TRANS;
$$ = (Node *)n;
}
| END_TRANS
{
TransactionStmt *n = makeNode(TransactionStmt);
n->command = END_TRANS;
$$ = (Node *)n;
}
| ROLLBACK
{
TransactionStmt *n = makeNode(TransactionStmt);
n->command = ABORT_TRANS;
$$ = (Node *)n;
}
;
;
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/psqlHelp.h
+
140
−
151
View file @
d8d0aa01
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: psqlHelp.h,v 1.4
7
1998/07/2
4
0
3:32:12 scrappy
Exp $
* $Id: psqlHelp.h,v 1.4
8
1998/07/2
5
0
0:17:29 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -26,42 +26,33 @@ static struct _helpStruct QL_HELP[] = {
...
@@ -26,42 +26,33 @@ static struct _helpStruct QL_HELP[] = {
"abort [transaction];"
},
"abort [transaction];"
},
{
"alter table"
,
{
"alter table"
,
"add/rename attributes, rename tables"
,
"add/rename attributes, rename tables"
,
"
\t
alter table <
class_name
>
[*]
add column <
attr
> <
type
>
\n
\
"
\t
ALTER TABLE
class_name [*]
ADD COLUMN
attr
type
\n
\
\t
alter table <
class_name
>
[*]
rename [column
]
<
attr1
> to <
attr2
>
\n
\
\t
ALTER TABLE
class_name [*]
RENAME [COLUMN
] attr1
TO
attr2
\n
\
\t
alter table <class_name1> rename to <
class_name2
>
"
},
\t
ALTER TABLE class_name1 RENAME TO
class_name2"
},
{
"alter user"
,
{
"alter user"
,
"alter system information for a user"
,
"alter system information for a user"
,
"alter user <user_name>
\n
\
"ALTER USER user_name
\n
\
\t
[with password <password>]
\n
\
\t
[WITH PASSWORD password]
\n
\
\t
[createdb | noccreatedb]
\n
\
\t
[CREATEDB | NOCCREATEDB]
\n
\
\t
[createuser | nocreateuser]
\n
\
\t
[CREATEUSER | NOCREATEUSER]
\n
\
\t
[in group <group_1>, ..., <group_n>]
\n
\
\t
[IN GROUP group_1, ...groupN]
\n
\
\t
[valid until '<abstime>'];"
},
\t
[VALID UNTIL 'abstime'];"
},
{
"begin"
,
"begin a new transaction"
,
"begin [transaction|work];"
},
{
"begin transaction"
,
"begin a new transaction"
,
"begin [transaction|work];"
},
{
"begin work"
,
{
"begin work"
,
"begin a new transaction"
,
"begin a new transaction"
,
"
begin [transaction|work
];"
},
"
BEGIN [TRANSACTION|WORK
];"
},
{
"cluster"
,
{
"cluster"
,
"create a clustered index (from an existing index)"
,
"create a clustered index (from an existing index)"
,
"
cluster <
index_name
> on <
relation_name
>
"
},
"
CLUSTER
index_name
ON
relation_name"
},
{
"close"
,
{
"close"
,
"close an existing cursor (cursor)"
,
"close an existing cursor (cursor)"
,
"close <cursorname>;"
},
"CLOSE cursorname;"
},
{
"commit"
,
"commit a transaction"
,
"commit [work]"
},
{
"commit work"
,
{
"commit work"
,
"commit a transaction"
,
"commit a transaction"
,
"
commit [work
]"
},
"
COMMIT [TRANSACTION|WORK
]"
},
{
"copy"
,
{
"copy"
,
"copy data to and from a table"
,
"copy data to and from a table"
,
"
copy [binary
]
<
class_name
>
[
with oids
]
\n
\
"
COPY [BINARY
] class_name [
WITH OIDS
]
\n
\
\t
{to|from} {<filename>|stdin|stdout} [using delimiters <
delim
>
];"
},
\t
TO|FROM filename|STDIN|STDOUT [USING DELIMITERS '
delim
'
];"
},
{
"create"
,
{
"create"
,
"Please be more specific:"
,
"Please be more specific:"
,
"
\t
create aggregate
\n
\
"
\t
create aggregate
\n
\
...
@@ -77,98 +68,98 @@ static struct _helpStruct QL_HELP[] = {
...
@@ -77,98 +68,98 @@ static struct _helpStruct QL_HELP[] = {
\t
create view"
},
\t
create view"
},
{
"create aggregate"
,
{
"create aggregate"
,
"define an aggregate function"
,
"define an aggregate function"
,
"
create aggregate <
agg_name
>
[
as
] (
basetype
=
<
data_type
>
,
\n
\
"
CREATE AGGREGATE
agg_name [
AS
] (
BASETYPE
= data_type,
\n
\
\t
[
sfunc
1 =
<
sfunc_1
>
,
stype
1 =
<
sfunc1_return_type
>
]
\n
\
\t
[
SFUNC
1 = sfunc_1,
STYPE
1 = sfunc1_return_type]
\n
\
\t
[
sfunc
2 =
<
sfunc_2
>
,
stype
2 =
<
sfunc2_return_type
>
]
\n
\
\t
[
SFUNC
2 = sfunc_2,
STYPE
2 = sfunc2_return_type]
\n
\
\t
[,
finalfunc
=
<
final-function
>
]
\n
\
\t
[,
FINALFUNC
= final-function]
\n
\
\t
[,
initcond
1 =
<
initial-cond1
>
][,
initcond
2 =
<
initial-cond2
>
]);"
},
\t
[,
INITCOND
1 = initial-cond1][,
INITCOND
2 = initial-cond2]);"
},
{
"create database"
,
{
"create database"
,
"create a database"
,
"create a database"
,
"
create database <
dbname
>
[
with location
= '
<
dbpath
>
']"
},
"
CREATE DATABASE
dbname [
WITH LOCATION
= 'dbpath']"
},
{
"create function"
,
{
"create function"
,
"create a user-defined function"
,
"create a user-defined function"
,
"
create function <
function_name
>
([
<
type1
>
,...
<
typeN
>
])
returns <
return_type
>
\n
\
"
CREATE FUNCTION
function_name ([type1,
...typeN])
RETURNS
return_type
\n
\
\t
as
'
<
object_filename
>
'|'
<
sql-queries
>
'
\n
\
\t
AS
'object_filename'|'sql-queries'
\n
\
\t
language
'c'|'sql'|'internal';"
},
\t
LANGUAGE
'c'|'sql'|'internal';"
},
{
"create index"
,
{
"create index"
,
"construct an index"
,
"construct an index"
,
"
create [unique] index <
indexname
> on <
class_name
>
[
using <
access_method
>
]
\n
\
"
CREATE [UNIQUE] INDEX
indexname
ON
class_name [
USING
access_method]
\n
\
(
<
attr1
>
[
<
type_class1
>] [,...]
|
<
funcname
>(<
attr1
>
,...) [
<
type_class
>
] );"
},
( attr1 [type_class1
], ...attrN
| funcname
(
attr1,
...) [type_class] );"
},
{
"create operator"
,
{
"create operator"
,
"create a user-defined operator"
,
"create a user-defined operator"
,
"
create operator <
operator_name
>
(
\n
\
"
CREATE OPERATOR
operator_name (
\n
\
\t
[
leftarg
=
<
type1
>
][,
rightarg
=
<
type2
>
]
\n
\
\t
[
LEFTARG
= type1][,
RIGHTARG
= type2]
\n
\
\t
,
procedure
=
<
func_name
>
,
\n
\
\t
,
PROCEDURE
= func_name,
\n
\
\t
[,
commutator
=
<
com_op
>
][,
negator
=
<
neg_op
>
]
\n
\
\t
[,
COMMUTATOR
= com_op][,
NEGATOR
= neg_op]
\n
\
\t
[,
restrict
=
<
res_proc
>
][,
hashes
]
\n
\
\t
[,
RESTRICT
= res_proc][,
HASHES
]
\n
\
\t
[,
join
=
<
join_proc
>
][,
sort
=
<
sort_op1
>
...
<
sort_opN
>
]);"
},
\t
[,
JOIN
= join_proc][,
SORT
= sort_op1...sort_opN]);"
},
{
"create rule"
,
{
"create rule"
,
"define a new rule"
,
"define a new rule"
,
"
create rule <
rule_name
> as on
\n
\
"
CREATE RULE
rule_name
AS ON
\n
\
\t
[
select|update|delete|insert
]
\n
\
\t
[
SELECT|UPDATE|DELETE|INSERT
]
\n
\
\t
to <
object
>
[
where <
qual
>
]
\n
\
\t
TO
object [
WHERE
qual]
\n
\
\t
do [instead
] [
<
action
>|nothing| [<
actions
>
]];"
},
\t
DO [INSTEAD
] [action
|NOTHING|[
actions]];"
},
{
"create sequence"
,
{
"create sequence"
,
"create a new sequence number generator"
,
"create a new sequence number generator"
,
"
create sequence <
sequence_name
>
\n
\
"
CREATE SEQUENCE
sequence_name
\n
\
\t
[
increment <NUMBER>
]
\n
\
\t
[
INCREMENT number
]
\n
\
\t
[
start <NUMBER>
]
\n
\
\t
[
START number
]
\n
\
\t
[
minvalue <NUMBER>
]
\n
\
\t
[
MINVALUE number
]
\n
\
\t
[
maxvalue <NUMBER>
]
\n
\
\t
[
MAXVALUE number
]
\n
\
\t
[
cache <NUMBER>
]
\n
\
\t
[
CACHE number
]
\n
\
\t
[
cycle
];"
},
\t
[
CYCLE
];"
},
{
"create table"
,
{
"create table"
,
"create a new table"
,
"create a new table"
,
"
create table <
class_name
>
\n
\
"
CREATE TABLE
class_name
\n
\
\t
(
<
attr1
> <
type1
>
[
default <
expression
>
] [
not null] [,...]
)
\n
\
\t
(attr1
type1 [
DEFAULT
expression] [
NOT NULL], ...attrN
)
\n
\
\t
[
inherits
(
<
class_name1
>
,...
<
class_nameN
>
)
\n
\
\t
[
INHERITS
(class_name1,
...class_nameN)
\n
\
\t
[[
constraint <
name
>
]
check <
condition
> [,...
] ]
\n
\
\t
[[
CONSTRAINT
name]
CHECK
condition
1, ...conditionN
] ]
\n
\
;"
},
;"
},
{
"create trigger"
,
{
"create trigger"
,
"create a new trigger"
,
"create a new trigger"
,
"
create trigger <trigger_name> after|before
event1 [
or
event2 [
or
event3] ]
\n
\
"
CREATE TRIGGER trigger_name AFTER|BEFORE
event1 [
OR
event2 [
OR
event3] ]
\n
\
\t
on <
class_name
> for each row|statement
\n
\
\t
ON
class_name
FOR EACH ROW|STATEMENT
\n
\
\t
execute procedure <
func_name
>
([arguments])
\n
\
\t
EXECUTE PROCEDURE
func_name ([arguments])
\n
\
\n
\
\n
\
\t
eventX is one of INSERT, DELETE, UPDATE"
},
\t
eventX is one of INSERT, DELETE, UPDATE"
},
{
"create type"
,
{
"create type"
,
"create a new user-defined base data type"
,
"create a new user-defined base data type"
,
"
create type <
typename
>
(
\n
\
"
CREATE TYPE
typename (
\n
\
\t
internallength
= (
<
number
> | variable
),
\n
\
\t
INTERNALLENGTH
= (number
|VARIABLE
),
\n
\
\t
[
externallength
= (
<
number
>|variable
),]
\n
\
\t
[
EXTERNALLENGTH
= (number
|VARIABLE
),]
\n
\
\t
input=<
input_function
>
,
output
=
<
output_function
>
\n
\
\t
INPUT =
input_function,
OUTPUT
= output_function
\n
\
\t
[,
element
=
<
typename
>
][,
delimiter=<
character
>
][,
default
=
\'
<string>
\'
]
\n
\
\t
[,
ELEMENT
= typename][,
DELIMITER =
character][,
DEFAULT
=
\'
<string>
\'
]
\n
\
\t
[,
send
=
<
send_function
>
][,
receive
=
<
receive_function
>
][,
passedbyvalue
]);"
},
\t
[,
SEND
= send_function][,
RECEIVE
= receive_function][,
PASSEDBYVALUE
]);"
},
{
"create user"
,
{
"create user"
,
"create a new user"
,
"create a new user"
,
"
create user <
user_name
>
\n
\
"
CREATE USER
user_name
\n
\
\t
[
with password <
password
>
]
\n
\
\t
[
WITH PASSWORD
password]
\n
\
\t
[
createdb | nocreatedb
]
\n
\
\t
[
CREATEDB | NOCREATEDB
]
\n
\
\t
[
createuser | nocreateuser
]
\n
\
\t
[
CREATEUSER | NOCREATEUSER
]
\n
\
\t
[
in group <
group
_1>
, ...
, <
group
_n>
]
\n
\
\t
[
IN GROUP
group
1
, ...group
N
]
\n
\
\t
[
valid until
'
<
abstime
>
'];"
},
\t
[
VALID UNTIL
'abstime'];"
},
{
"create view"
,
{
"create view"
,
"create a view"
,
"create a view"
,
"
create view <
view_name
> as
\n
\
"
CREATE VIEW
view_name
AS
\n
\
\t
select [distinct [on
attrN]]
\n
\
\t
SELECT [DISTINCT [ON
attrN]]
\n
\
\t
<
expr1
>[as <
attr1
>][,
...
<
exprN
>[as <attrN>]]
\n
\
\t
expr1
[AS
attr1
],
...exprN
\n
\
\t
[
from <
from_list
>
]
\n
\
\t
[
FROM
from_list]
\n
\
\t
[
where <
qual
>
]
\n
\
\t
[
WHERE
qual]
\n
\
\t
[
group by <
group_list
>
];"
},
\t
[
GROUP BY
group_list];"
},
{
"declare"
,
{
"declare"
,
"set up a cursor"
,
"set up a cursor"
,
"
declare <
cursorname
>
[
binary] cursor for
\n
\
"
DECLARE
cursorname [
BINARY] CURSOR FOR
\n
\
\t
select [distinct [on
attrN]]
\n
\
\t
SELECT [DISTINCT [ON
attrN]]
\n
\
\t
<
expr1
>
[
as <
attr1
>
],...
<
exprN
> [as <attrN>]
\n
\
\t
expr1 [
AS
attr1],
...exprN
\n
\
\t
[
from <
from_list
>
]
\n
\
\t
[
FROM
from_list]
\n
\
\t
[
where <
qual
>
]
\n
\
\t
[
WHERE
qual]
\n
\
\t
[
group by <
group_list
>
]
\n
\
\t
[
GROUP BY
group_list]
\n
\
\t
[
having <
having_clause
>
]
\n
\
\t
[
HAVING
having_clause]
\n
\
\t
[
order by <
attr1
>
[
using <
op1
>
],...
<
attrN
> [using <opN>]
]
\n
\
\t
[
ORDER BY
attr1 [
USING
op1],
...attrN]
\n
\
\t
[
union [all] select
...];"
},
\t
[
UNION [ALL] SELECT
...];"
},
{
"delete"
,
{
"delete"
,
"delete tuples"
,
"delete tuples"
,
"
delete from <
class_name
>
[
where <
qual
>
];"
},
"
DELETE FROM
class_name [
WHERE
qual];"
},
{
"drop"
,
{
"drop"
,
"Please be more specific:"
,
"Please be more specific:"
,
"
\t
drop aggregate
\n
\
"
\t
drop aggregate
\n
\
...
@@ -184,136 +175,134 @@ static struct _helpStruct QL_HELP[] = {
...
@@ -184,136 +175,134 @@ static struct _helpStruct QL_HELP[] = {
\t
drop view"
},
\t
drop view"
},
{
"drop aggregate"
,
{
"drop aggregate"
,
"remove an aggregate function"
,
"remove an aggregate function"
,
"
drop aggregate <
agg_name
> <
agg_type
>
|*;"
},
"
DROP AGGREGATE
agg_name
agg_type|*;"
},
{
"drop database"
,
{
"drop database"
,
"remove a database"
,
"remove a database"
,
"
drop database <
dbname
>
"
},
"
DROP DATABASE
dbname"
},
{
"drop function"
,
{
"drop function"
,
"remove a user-defined function"
,
"remove a user-defined function"
,
"
drop function <
funcname
>
([
<
type1
>,.
...
<
typeN
>
]);"
},
"
DROP FUNCTION
funcname ([type1
,
...typeN]);"
},
{
"drop index"
,
{
"drop index"
,
"remove an existing index"
,
"remove an existing index"
,
"
drop index <
indexname
>
;"
},
"
DROP INDEX
indexname;"
},
{
"drop operator"
,
{
"drop operator"
,
"remove a user-defined operator"
,
"remove a user-defined operator"
,
"
drop operator <
operator_name
>
([
<
ltype
>|none],[<rtype>
|none]);"
},
"
DROP OPERATOR
operator_name ([ltype
|NONE],[RTYPE
|none]);"
},
{
"drop rule"
,
{
"drop rule"
,
"remove a rule"
,
"remove a rule"
,
"
drop rule <
rulename
>
;"
},
"
DROP RULE
rulename;"
},
{
"drop sequence"
,
{
"drop sequence"
,
"remove a sequence number generator"
,
"remove a sequence number generator"
,
"
drop sequence <
sequence_name
>
[,...
<
sequence_nameN];"
},
"
DROP SEQUENCE
sequence_name[,
...sequence_nameN];"
},
{
"drop table"
,
{
"drop table"
,
"remove a table"
,
"remove a table"
,
"
drop table <
class_name
>[,
...
<
class_nameN
]
;"
},
"
DROP TABLE
class_name
1,
...class_nameN;"
},
{
"drop trigger"
,
{
"drop trigger"
,
"remove a trigger"
,
"remove a trigger"
,
"
drop trigger <
trigger_name
> on <
class_name
>
;"
},
"
DROP TRIGGER
trigger_name
ON
class_name;"
},
{
"drop type"
,
{
"drop type"
,
"remove a user-defined base type"
,
"remove a user-defined base type"
,
"
drop type <
typename
>
;"
},
"
DROP TYPE
typename;"
},
{
"drop user"
,
{
"drop user"
,
"remove a user from the system"
,
"remove a user from the system"
,
"
drop user <
user_name
>
;"
},
"
DROP USER
user_name;"
},
{
"drop view"
,
{
"drop view"
,
"remove a view"
,
"remove a view"
,
"drop view <view_name>"
},
"DROP VIEW view_name"
},
{
"end"
,
"end the current transaction"
,
"end [transaction];"
},
{
"end transaction"
,
{
"end transaction"
,
"end the current transaction"
,
"end the current transaction"
,
"
end [transaction
];"
},
"
END [TRANSACTION|WORK
];"
},
{
"explain"
,
{
"explain"
,
"explain the query execution plan"
,
"explain the query execution plan"
,
"
explain [verbose
]
<
query
>
"
},
"
EXPLAIN [VERBOSE
] query"
},
{
"fetch"
,
{
"fetch"
,
"retrieve tuples from a cursor"
,
"retrieve tuples from a cursor"
,
"
fetch [forward|backward
] [
<
number
>|all] [in <
cursorname
>
];"
},
"
FETCH [FORWARD|BACKWARD
] [number
|ALL] [IN
cursorname];"
},
{
"grant"
,
{
"grant"
,
"grant access control to a user or group"
,
"grant access control to a user or group"
,
"
grant <
privilege
[,
privilege
,...]> on <
rel1
>[
,...
<
rel
n>] to
\n
\
"
GRANT
privilege
1, ...
privilege
N ON
rel1,
...rel
N TO
\n
\
[
public | group <group> | <
username
>
]
\n
\
[
PUBLIC|GROUP group|
username]
\n
\
\t
privilege is
{
ALL
|
SELECT
|
INSERT
|
UPDATE
|
DELETE
|
RULE
}
"
},
\t
privilege is ALL
|
SELECT
|
INSERT
|
UPDATE
|
DELETE
|
RULE"
},
{
"insert"
,
{
"insert"
,
"insert tuples"
,
"insert tuples"
,
"
insert into <
class_name
>
[(
<
attr1
>
...
<
attrN
>
)]
\n
\
"
INSERT INTO
class_name [(attr1
,
...attrN)]
\n
\
\t
values
(
<
expr1
>.
..
<
exprN
>
) |
\n
\
\t
VALUES
(expr1
,
..exprN) |
\n
\
\t
select [distinct [on
attrN]]
\n
\
\t
SELECT [DISTINCT [ON
attrN]]
\n
\
\t
<
expr1
>
,...
<
exprN
>
\n
\
\t
expr1,
...exprN
\n
\
\t
[
from <
from_clause
>
]
\n
\
\t
[
FROM
from_clause]
\n
\
\t
[
where <
qual
>
]
\n
\
\t
[
WHERE
qual]
\n
\
\t
[
group by <
group_list
>
]
\n
\
\t
[
GROUP BY
group_list]
\n
\
\t
[
having <
having_clause
>
]
\n
\
\t
[
HAVING
having_clause]
\n
\
\t
[
union [all] select
...];"
},
\t
[
UNION [ALL] SELECT
...];"
},
{
"listen"
,
{
"listen"
,
"listen for notification on a relation"
,
"listen for notification on a relation"
,
"
listen <
class_name
>
"
},
"
LISTEN
class_name"
},
{
"load"
,
{
"load"
,
"dynamically load a module"
,
"dynamically load a module"
,
"
load <
filename
>
;"
},
"
LOAD '
filename
'
;"
},
{
"lock"
,
{
"lock"
,
"exclusive lock a table inside a transaction"
,
"exclusive lock a table inside a transaction"
,
"
lock [table
]
<
class_name
>
;"
},
"
LOCK [TABLE
] class_name;"
},
{
"move"
,
{
"move"
,
"move an cursor position"
,
"move an cursor position"
,
"
move [forward|backward
] [
<
number
>|all] [in <
cursorname
>
];"
},
"
MOVE [FORWARD|BACKWARD
] [number
|ALL] [IN
cursorname];"
},
{
"notify"
,
{
"notify"
,
"signal all frontends and backends listening on a relation"
,
"signal all frontends and backends listening on a relation"
,
"
notify <
class_name
>
"
},
"
NOTIFY
class_name"
},
{
"reset"
,
{
"reset"
,
"set run-time environment back to default"
,
"set run-time environment back to default"
,
#ifdef MULTIBYTE
#ifdef MULTIBYTE
"
reset {
DateStyle
|
GEQO
|
R_PLANS
|
CLIENT_ENCODING
}
"
},
"
RESET
DateStyle
|
GEQO
|
R_PLANS
|
CLIENT_ENCODING"
},
#else
#else
"
reset {
DateStyle
|
GEQO
|
R_PLANS
}
"
},
"
RESET
DateStyle
|
GEQO
|
R_PLANS"
},
#endif
#endif
{
"revoke"
,
{
"revoke"
,
"revoke access control from a user or group"
,
"revoke access control from a user or group"
,
"
revoke <
privilege
[,
privilege
,...]> on <
rel1
>[
,...
<
rel
n>] from
\n
\
"
REVOKE
privilege
1, ...
privilege
N ON
rel1,
...rel
N FROM
\n
\
[
public | group <group> | <
username
>
]
\n
\
[
PUBLIC|GROUP group|
username]
\n
\
\t
privilege is
{
ALL
|
SELECT
|
INSERT
|
UPDATE
|
DELETE
|
RULE
}
"
},
\t
privilege is ALL
|
SELECT
|
INSERT
|
UPDATE
|
DELETE
|
RULE"
},
{
"rollback"
,
{
"rollback"
,
"abort a transaction"
,
"abort a transaction"
,
"
rollback [transaction|work
]"
},
"
ROLLBACK [TRANSACTION|WORK
]"
},
{
"select"
,
{
"select"
,
"retrieve tuples"
,
"retrieve tuples"
,
"
select [distinct [on <
attrN
>
]]
<
expr1
>
[
as <
attr1
>
], ...
<
exprN
> [as <attrN>]
\n
\
"
SELECT [DISTINCT [ON
attrN]] expr1 [
AS
attr1], ...exprN
\n
\
\t
[
into [table
]
<
class_name
>
]
\n
\
\t
[
INTO [TABLE
] class_name]
\n
\
\t
[
from <
from_list
>
]
\n
\
\t
[
FROM
from_list]
\n
\
\t
[
where <
qual
>
]
\n
\
\t
[
WHERE
qual]
\n
\
\t
[
group by <
group_list
>
]
\n
\
\t
[
GROUP BY
group_list]
\n
\
\t
[
having <
having_clause
>
]
\n
\
\t
[
HAVING
having_clause]
\n
\
\t
[
order by <
attr1
>
[ASC
|
DESC] [
using <
op1
>
], ...
<
attrN
>
]
\n
\
\t
[
ORDER BY
attr1 [ASC
|
DESC] [
USING
op1], ...attrN ]
\n
\
\t
[
union [all] select
...];"
},
\t
[
UNION [ALL] SELECT
...];"
},
{
"set"
,
{
"set"
,
"set run-time environment"
,
"set run-time environment"
,
#ifdef MULTIBYTE
#ifdef MULTIBYTE
"
set
DateStyle
to {
'ISO'
|
'SQL'
|
'Postgres'
|
'European'
|
'US'
|
'NonEuropean'
}
\n
\
"
SET
DateStyle
TO
'ISO'
|
'SQL'
|
'Postgres'
|
'European'
|
'US'
|
'NonEuropean'
\n
\
set GEQO
to {
'ON[=#]'
|
'OFF'
}
\n
\
set GEQO
TO
'ON[=#]'
|
'OFF'
\n
\
set R_PLANS
to {
'ON'
|
'OFF'
}
\n
\
set R_PLANS
TO
'ON'
|
'OFF'
\n
\
set CLIENT_ENCODING
to {
'EUC_JP'
|
'SJIS'
|
'EUC_CN'
|
'EUC_KR'
|
'EUC_TW'
|
'MULE_INTERNAL'
|
'LATIN1'
|
'LATIN2'
|
'LATIN3'
|
'LATIN4'
|
'LATIN5'
}
"
},
set CLIENT_ENCODING
TO
'EUC_JP'
|
'SJIS'
|
'EUC_CN'
|
'EUC_KR'
|
'EUC_TW'
|
'MULE_INTERNAL'
|
'LATIN1'
|
'LATIN2'
|
'LATIN3'
|
'LATIN4'
|
'LATIN5'"
},
#else
#else
"
set
DateStyle
to {
'ISO'
|
'SQL'
|
'Postgres'
|
'European'
|
'US'
|
'NonEuropean'
}
\n
\
"
SET
DateStyle
TO
'ISO'
|
'SQL'
|
'Postgres'
|
'European'
|
'US'
|
'NonEuropean'
\n
\
set GEQO
to {
'ON[=#]'
|
'OFF'
}
\n
\
set GEQO
TO
'ON[=#]'
|
'OFF'
\n
\
set R_PLANS
to {
'ON'
| 'OFF'
}
"
}
,
set R_PLANS
TO
'ON'| 'OFF'"
}
,
#endif
#endif
{
"show"
,
{
"show"
,
"show current run-time environment"
,
"show current run-time environment"
,
#ifdef MULTIBYTE
#ifdef MULTIBYTE
"
show {
DateStyle
|
GEQO
|
R_PLANS
|
CLIENT_ENCODING
}
"
},
"
SHOW
DateStyle
|
GEQO
|
R_PLANS
|
CLIENT_ENCODING"
},
#else
#else
"
show {
DateStyle
|
GEQO
|
R_PLANS
}
"
}
,
"
SHOW
DateStyle
|
GEQO
|
R_PLANS"
}
,
#endif
#endif
{
"
update
"
,
{
"
UPDATE
"
,
"update tuples"
,
"update tuples"
,
"update <class_name> set <attr1>=<expr1>,...<attrN>=<exprN> [from <from_clause>] [where <qual>];"
},
"UPDATE class_name SET attr1 = expr1, ...attrN = exprN
\n
\
\t
[FROM from_clause]
\n
\
\t
[WHERE qual];"
},
{
"vacuum"
,
{
"vacuum"
,
"vacuum the database, i.e. cleans out deleted records, updates statistics"
,
"vacuum the database, i.e. cleans out deleted records, updates statistics"
,
"\
"VACUUM [VERBOSE] [ANALYZE] [table]
\n
\
vacuum [verbose] [analyze] [table]
\n
\
\t
or
\n
\
\t
or
\n
\
vacuum [verbose] analyze
[table [(attr1, ...
attrN)]];"
},
VACUUM [VERBOSE] ANALYZE
[table [(attr1, ...attrN)]];"
},
{
NULL
,
NULL
,
NULL
}
/* important to keep a NULL terminator
{
NULL
,
NULL
,
NULL
}
/* important to keep a NULL terminator
* here! */
* here! */
}
;
}
;
This diff is collapsed.
Click to expand it.
src/man/create_operator.l
+
2
−
2
View file @
d8d0aa01
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_operator.l,v 1.
6
1998/0
6
/2
4 13:21:24
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_operator.l,v 1.
7
1998/0
7
/2
5 00:17:30
momjian Exp $
.TH "CREATE OPERATOR" SQL 11/05/95 PostgreSQL PostgreSQL
.TH "CREATE OPERATOR" SQL 11/05/95 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
create operator - define a new user operator
create operator - define a new user operator
...
@@ -30,7 +30,7 @@ The user who defines an operator becomes its owner.
...
@@ -30,7 +30,7 @@ The user who defines an operator becomes its owner.
.PP
.PP
The
The
.IR "operator_name"
.IR "operator_name"
is a sequence of
up to sixteen
punctuation characters. The following
is a sequence of punctuation characters. The following
characters are valid for single-character operator names:
characters are valid for single-character operator names:
.nf
.nf
...
...
This diff is collapsed.
Click to expand it.
src/man/load.l
+
3
−
3
View file @
d8d0aa01
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/load.l,v 1.
3
1998/0
1/11 22
:17:
4
3 momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/load.l,v 1.
4
1998/0
7/25 00
:17:3
0
momjian Exp $
.TH LOAD SQL 01/23/93 PostgreSQL PostgreSQL
.TH LOAD SQL 01/23/93 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
load - dynamically load an object file
load - dynamically load an object file
.SH SYNOPSIS
.SH SYNOPSIS
.nf
.nf
\fBload\fR
"
filename
"
\fBload\fR
'
filename
'
.fi
.fi
.SH DESCRIPTION
.SH DESCRIPTION
.BR Load
.BR Load
...
@@ -27,7 +27,7 @@ at this time.
...
@@ -27,7 +27,7 @@ at this time.
--
--
--Load the file /usr/postgres/demo/circle.o
--Load the file /usr/postgres/demo/circle.o
--
--
load
"
/usr/postgres/demo/circle.o
"
load
'
/usr/postgres/demo/circle.o
'
.fi
.fi
.SH CAVEATS
.SH CAVEATS
Functions in loaded object files should not call functions in other
Functions in loaded object files should not call functions in other
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment