Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36ea267

Browse files
committed
Add optional drop behavior clause to REVOKE command, for SQL conformance.
Currently, only RESTRICT is allowed.
1 parent611278c commit36ea267

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

‎doc/src/sgml/features.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.12 2002/12/14 00:24:23 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.13 2003/01/10 11:02:41 petere Exp $
33
-->
44

55
<appendix id="features">
@@ -740,6 +740,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.12 2002/12/14 00:24:23 pe
740740
<entry>DROP VIEW statement: RESTRICT clause</entry>
741741
<entry></entry>
742742
</row>
743+
<row>
744+
<entry>F031-19</entry>
745+
<entry>Core</entry>
746+
<entry>REVOKE statement: RESTRICT clause</entry>
747+
<entry></entry>
748+
</row>
743749
<row>
744750
<entry>F032</entry>
745751
<entry></entry>
@@ -1629,12 +1635,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.12 2002/12/14 00:24:23 pe
16291635
<entry>Module language</entry>
16301636
<entry></entry>
16311637
</row>
1632-
<row>
1633-
<entry>F031-19</entry>
1634-
<entry>Core</entry>
1635-
<entry>REVOKE statement: RESTRICT clause</entry>
1636-
<entry></entry>
1637-
</row>
16381638
<row>
16391639
<entry>F034</entry>
16401640
<entry></entry>

‎doc/src/sgml/ref/revoke.sgml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.23 2002/11/21 23:34:43 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.24 2003/01/10 11:02:51 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -20,22 +20,27 @@ REVOKE { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER }
2020
[,...] | ALL [ PRIVILEGES ] }
2121
ON [ TABLE ] <replaceable class="PARAMETER">tablename</replaceable> [, ...]
2222
FROM { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
23+
[ RESTRICT ]
2324

2425
REVOKE { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
2526
ON DATABASE <replaceable>dbname</replaceable> [, ...]
2627
FROM { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
28+
[ RESTRICT ]
2729

2830
REVOKE { EXECUTE | ALL [ PRIVILEGES ] }
2931
ON FUNCTION <replaceable>funcname</replaceable> ([<replaceable>type</replaceable>, ...]) [, ...]
3032
FROM { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
33+
[ RESTRICT ]
3134

3235
REVOKE { USAGE | ALL [ PRIVILEGES ] }
3336
ON LANGUAGE <replaceable>langname</replaceable> [, ...]
3437
FROM { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
38+
[ RESTRICT ]
3539

3640
REVOKE { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
3741
ON SCHEMA <replaceable>schemaname</replaceable> [, ...]
3842
FROM { <replaceable class="PARAMETER">username</replaceable> | GROUP <replaceable class="PARAMETER">groupname</replaceable> | PUBLIC } [, ...]
43+
[ RESTRICT ]
3944
</synopsis>
4045
</refsynopsisdiv>
4146

@@ -63,6 +68,11 @@ REVOKE { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
6368
See the description of the <xref linkend="sql-grant" endterm="sql-grant-title"> command for
6469
the meaning of the privilege types.
6570
</para>
71+
72+
<para>
73+
The <literal>RESTRICT</literal> key word is currently only noise.
74+
See also the compatibility notes below.
75+
</para>
6676
</refsect1>
6777

6878
<refsect1 id="SQL-REVOKE-notes">

‎src/backend/parser/gram.y

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.392 2003/01/09 20:50:51tgl Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.393 2003/01/10 11:02:51petere Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -2751,14 +2751,18 @@ GrantStmt:GRANT privileges ON privilege_target TO grantee_list
27512751
;
27522752

27532753
RevokeStmt: REVOKE opt_revoke_grant_option privileges ON privilege_target
2754-
FROM grantee_list
2754+
FROM grantee_list opt_drop_behavior
27552755
{
27562756
GrantStmt *n = makeNode(GrantStmt);
27572757
n->is_grant =false;
27582758
n->privileges =$3;
27592759
n->objtype = ($5)->objtype;
27602760
n->objects = ($5)->objs;
27612761
n->grantees =$7;
2762+
2763+
if ($8 == DROP_CASCADE)
2764+
elog(ERROR,"REVOKE ... CASCADE is not implemented");
2765+
27622766
$$ = (Node *)n;
27632767
}
27642768
;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp