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

Commitdbe2946

Browse files
committed
Doc: clarify use of NULL to drop comments and security labels.
This was only mentioned in the description of the text/label, whichare marked as being in quotes in the synopsis, which can causeconfusion (as witnessed on IRC).Also separate the literal and NULL cases in the parameter list, persuggestion from Tom Lane.Also add an example of dropping a security label.Dagfinn Ilmari Mannsåker, with some tweaks by meDiscussion:https://postgr.es/m/87sffqk4zp.fsf@wibble.ilmari.org
1 parente8fb2a7 commitdbe2946

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

‎doc/src/sgml/ref/comment.sgml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ COMMENT ON
6666
TRIGGER <replaceable class="parameter">trigger_name</replaceable> ON <replaceable class="parameter">table_name</replaceable> |
6767
TYPE <replaceable class="parameter">object_name</replaceable> |
6868
VIEW <replaceable class="parameter">object_name</replaceable>
69-
} IS'<replaceable class="parameter">text</replaceable>'
69+
} IS{<replaceable class="parameter">string_literal</replaceable> | NULL }
7070

7171
<phrase>where <replaceable>aggregate_signature</replaceable> is:</phrase>
7272

@@ -264,11 +264,19 @@ COMMENT ON
264264
</varlistentry>
265265

266266
<varlistentry>
267-
<term><replaceable class="parameter">text</replaceable></term>
267+
<term><replaceable class="parameter">string_literal</replaceable></term>
268268
<listitem>
269269
<para>
270-
The new comment, written as a string literal; or <literal>NULL</literal>
271-
to drop the comment.
270+
The new comment contents, written as a string literal.
271+
</para>
272+
</listitem>
273+
</varlistentry>
274+
275+
<varlistentry>
276+
<term><literal>NULL</literal></term>
277+
<listitem>
278+
<para>
279+
Write <literal>NULL</literal> to drop the comment.
272280
</para>
273281
</listitem>
274282
</varlistentry>

‎doc/src/sgml/ref/security_label.sgml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON
4444
TABLESPACE <replaceable class="parameter">object_name</replaceable> |
4545
TYPE <replaceable class="parameter">object_name</replaceable> |
4646
VIEW <replaceable class="parameter">object_name</replaceable>
47-
} IS'<replaceable class="parameter">label</replaceable>'
47+
} IS{<replaceable class="parameter">string_literal</replaceable> | NULL }
4848

4949
<phrase>where <replaceable>aggregate_signature</replaceable> is:</phrase>
5050

@@ -179,11 +179,19 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON
179179
</varlistentry>
180180

181181
<varlistentry>
182-
<term><replaceable class="parameter">label</replaceable></term>
182+
<term><replaceable class="parameter">string_literal</replaceable></term>
183183
<listitem>
184184
<para>
185-
The new security label, written as a string literal; or <literal>NULL</literal>
186-
to drop the security label.
185+
The new setting of the security label, written as a string literal.
186+
</para>
187+
</listitem>
188+
</varlistentry>
189+
190+
<varlistentry>
191+
<term><literal>NULL</literal></term>
192+
<listitem>
193+
<para>
194+
Write <literal>NULL</literal> to drop the security label.
187195
</para>
188196
</listitem>
189197
</varlistentry>
@@ -194,12 +202,19 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON
194202
<title>Examples</title>
195203

196204
<para>
197-
The following example shows how the security label of a tablemight
198-
be changed.
205+
The following example shows how the security label of a tablecould
206+
beset orchanged:
199207

200208
<programlisting>
201209
SECURITY LABEL FOR selinux ON TABLE mytable IS 'system_u:object_r:sepgsql_table_t:s0';
202-
</programlisting></para>
210+
</programlisting>
211+
212+
To remove the label:
213+
214+
<programlisting>
215+
SECURITY LABEL FOR selinux ON TABLE mytable IS NULL;
216+
</programlisting>
217+
</para>
203218
</refsect1>
204219

205220
<refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp