Skip to content

Commit

Permalink
docs review, per Thom Brown comments and patches.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri committed Feb 25, 2012
1 parent b7b1858 commit b7798e8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
3 changes: 3 additions & 0 deletions doc/src/sgml/ref/allfiles.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY abort SYSTEM "abort.sgml">
<!ENTITY alterAggregate SYSTEM "alter_aggregate.sgml">
<!ENTITY alterCollation SYSTEM "alter_collation.sgml">
<!ENTITY alterCommandTrigger SYSTEM "alter_command_trigger.sgml">
<!ENTITY alterConversion SYSTEM "alter_conversion.sgml">
<!ENTITY alterDatabase SYSTEM "alter_database.sgml">
<!ENTITY alterDefaultPrivileges SYSTEM "alter_default_privileges.sgml">
Expand Down Expand Up @@ -50,6 +51,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY createAggregate SYSTEM "create_aggregate.sgml">
<!ENTITY createCast SYSTEM "create_cast.sgml">
<!ENTITY createCollation SYSTEM "create_collation.sgml">
<!ENTITY createCommandTrigger SYSTEM "create_command_trigger.sgml">
<!ENTITY createConversion SYSTEM "create_conversion.sgml">
<!ENTITY createDatabase SYSTEM "create_database.sgml">
<!ENTITY createDomain SYSTEM "create_domain.sgml">
Expand Down Expand Up @@ -88,6 +90,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY dropAggregate SYSTEM "drop_aggregate.sgml">
<!ENTITY dropCast SYSTEM "drop_cast.sgml">
<!ENTITY dropCollation SYSTEM "drop_collation.sgml">
<!ENTITY dropCommandTrigger SYSTEM "drop_command_trigger.sgml">
<!ENTITY dropConversion SYSTEM "drop_conversion.sgml">
<!ENTITY dropDatabase SYSTEM "drop_database.sgml">
<!ENTITY dropDomain SYSTEM "drop_domain.sgml">
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/ref/alter_command_trigger.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PostgreSQL documentation
<refpurpose>change the definition of a trigger</refpurpose>
</refnamediv>

<indexterm zone="sql-altertrigger">
<indexterm zone="sql-altercommandtrigger">
<primary>ALTER COMMAND TRIGGER</primary>
</indexterm>

Expand Down
35 changes: 18 additions & 17 deletions doc/src/sgml/ref/create_command_trigger.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ doc/src/sgml/ref/create_trigger.sgml
PostgreSQL documentation
-->

<refentry id="SQL-CREATETRIGGER">
<refentry id="SQL-CREATECOMMANDTRIGGER">
<refmeta>
<refentrytitle>CREATE COMMAND TRIGGER</refentrytitle>
<manvolnum>7</manvolnum>
Expand All @@ -21,10 +21,10 @@ PostgreSQL documentation

<refsynopsisdiv>
<synopsis>
CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } ANY COMMAND
CREATE COMMAND TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } ANY COMMAND
EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ()

CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } COMMAND <replaceable class="PARAMETER">command</replaceable> [, ... ]
CREATE COMMAND TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } <replaceable class="PARAMETER">command</replaceable> [, ... ]
EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ()

<phrase>where <replaceable class="parameter">command</replaceable> can be one of:</phrase>
Expand All @@ -49,10 +49,10 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
CREATE TEXT SEARCH DICTIONARY
CREATE TEXT SEARCH TEMPLATE
CREATE TEXT SEARCH CONFIGURATION
CREATE TYPE_P
CREATE DOMAIN_P
CREATE TYPE
CREATE DOMAIN
CREATE TRIGGER
CREATE CONVERSION_P
CREATE CONVERSION
CREATE CAST
CREATE OPERATOR CLASS
CREATE OPERATOR FAMILY
Expand All @@ -73,17 +73,17 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
ALTER TEXT SEARCH DICTIONARY
ALTER TEXT SEARCH TEMPLATE
ALTER TEXT SEARCH CONFIGURATION
ALTER TYPE_P
ALTER DOMAIN_P
ALTER TYPE
ALTER DOMAIN
ALTER TRIGGER
DROP TABLE
DROP SEQUENCE
DROP VIEW
DROP INDEX
DROP TYPE_P
DROP DOMAIN_P
DROP TYPE
DROP DOMAIN
DROP COLLATION
DROP CONVERSION_P
DROP CONVERSION
DROP SCHEMA
DROP EXTENSION
DROP TEXT SEARCH PARSER
Expand All @@ -108,7 +108,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
VACUUM
CLUSTER
LOAD

</synopsis>
</refsynopsisdiv>

Expand Down Expand Up @@ -261,6 +261,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
<refsect1 id="SQL-CREATECOMMANDTRIGGER-examples">
<title>Examples</title>

<para>
Forbids the execution of any DDL command:

<programlisting>
Expand All @@ -272,8 +273,8 @@ BEGIN
END;
$$;

CREATE TRIGGER abort_ddl
BEFORE COMMAND CREATE TABLE
CREATE COMMAND TRIGGER abort_ddl
BEFORE ANY COMMAND
EXECUTE PROCEDURE abort_any_command();
</programlisting>

Expand All @@ -283,7 +284,7 @@ CREATE TRIGGER abort_ddl
<programlisting>
CREATE OR REPLACE FUNCTION enforce_local_style
(tg_when text, cmd_tag text, objectid oid, schemaname text, objectname text)
RETURNS bool LANGUAGE plpgsql AS $$
RETURNS void LANGUAGE plpgsql AS $$
BEGIN
IF substring(objectname, 0, 4) NOT IN ('ab_', 'cz_', 'fr_')
THEN
Expand All @@ -292,8 +293,8 @@ BEGIN
END;
$$;

CREATE TRIGGER check_style
BEFORE COMMAND CREATE TABLE
CREATE COMMAND TRIGGER check_style
BEFORE CREATE TABLE
EXECUTE PROCEDURE enforce_local_style();
</programlisting>
</para>
Expand Down
20 changes: 10 additions & 10 deletions doc/src/sgml/ref/drop_command_trigger.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ DROP COMMAND TRIGGER [ IF EXISTS ] <replaceable class="PARAMETER">name</replacea
CREATE TEXT SEARCH DICTIONARY
CREATE TEXT SEARCH TEMPLATE
CREATE TEXT SEARCH CONFIGURATION
CREATE TYPE_P
CREATE DOMAIN_P
CREATE TYPE
CREATE DOMAIN
CREATE TRIGGER
CREATE CONVERSION_P
CREATE CONVERSION
CREATE CAST
CREATE OPERATOR CLASS
CREATE OPERATOR FAMILY
Expand All @@ -70,17 +70,17 @@ DROP COMMAND TRIGGER [ IF EXISTS ] <replaceable class="PARAMETER">name</replacea
ALTER TEXT SEARCH DICTIONARY
ALTER TEXT SEARCH TEMPLATE
ALTER TEXT SEARCH CONFIGURATION
ALTER TYPE_P
ALTER DOMAIN_P
ALTER TYPE
ALTER DOMAIN
ALTER TRIGGER
DROP TABLE
DROP SEQUENCE
DROP VIEW
DROP INDEX
DROP TYPE_P
DROP DOMAIN_P
DROP TYPE
DROP DOMAIN
DROP COLLATION
DROP CONVERSION_P
DROP CONVERSION
DROP SCHEMA
DROP EXTENSION
DROP TEXT SEARCH PARSER
Expand All @@ -104,7 +104,7 @@ DROP COMMAND TRIGGER [ IF EXISTS ] <replaceable class="PARAMETER">name</replacea
REINDEX
VACUUM
CLUSTER
LOAD
LOAD

</synopsis>
</refsynopsisdiv>
Expand Down Expand Up @@ -187,7 +187,7 @@ DROP COMMAND TRIGGER snitch ON ANY COMMAND;
<title>Compatibility</title>

<para>
The <command>DROP COMMAND TRIGGER</command> statement is a
The <command>DROP COMMAND TRIGGER</command> statement is a
<productname>PostgreSQL</productname> extension.
</para>
</refsect1>
Expand Down

0 comments on commit b7798e8

Please sign in to comment.