summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/insert.sgml
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2025-11-08 09:49:43 -0500
committerBruce Momjian <bruce@momjian.us>2025-11-08 09:49:43 -0500
commit980a855c5c2e21e964a739694e24004f72e03fdf (patch)
tree6f431d946445c84073afff474c26dbf0e0ed28d3 /doc/src/sgml/ref/insert.sgml
parente8bfad4ca842733b957c01e732ec009778f952cd (diff)
doc: consistently use "structname" and "structfield" markup
Previously "literal" and "classname" were used, inconsistently, for SQL table and column names. Reported-by: Peter Smith Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pvtf24r+bdPgBind84dBLPvgNL7aB+=HxAUupdPuo2gRg@mail.gmail.com Backpatch-through: master
Diffstat (limited to 'doc/src/sgml/ref/insert.sgml')
-rw-r--r--doc/src/sgml/ref/insert.sgml26
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index b337f2ee555..0598b8dea34 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -654,7 +654,7 @@ INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</repl
<title>Examples</title>
<para>
- Insert a single row into table <literal>films</literal>:
+ Insert a single row into table <structname>films</structname>:
<programlisting>
INSERT INTO films VALUES
@@ -663,7 +663,7 @@ INSERT INTO films VALUES
</para>
<para>
- In this example, the <literal>len</literal> column is
+ In this example, the <structfield>len</structfield> column is
omitted and therefore it will have the default value:
<programlisting>
@@ -704,8 +704,8 @@ INSERT INTO films (code, title, did, date_prod, kind) VALUES
<para>
This example inserts some rows into table
- <literal>films</literal> from a table <literal>tmp_films</literal>
- with the same column layout as <literal>films</literal>:
+ <structname>films</structname> from a table <structname>tmp_films</structname>
+ with the same column layout as <structname>films</structname>:
<programlisting>
INSERT INTO films SELECT * FROM tmp_films WHERE date_prod &lt; '2004-05-07';
@@ -726,7 +726,7 @@ INSERT INTO tictactoe (game, board)
</para>
<para>
- Insert a single row into table <literal>distributors</literal>, returning
+ Insert a single row into table <structname>distributors</structname>, returning
the sequence number generated by the <literal>DEFAULT</literal> clause:
<programlisting>
@@ -751,8 +751,8 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
<para>
Insert or update new distributors as appropriate. Assumes a unique
index has been defined that constrains values appearing in the
- <literal>did</literal> column. Note that the special
- <varname>excluded</varname> table is used to reference values originally
+ <structfield>did</structfield> column. Note that the special
+ <structname>excluded</structname> table is used to reference values originally
proposed for insertion:
<programlisting>
INSERT INTO distributors (did, dname)
@@ -763,8 +763,8 @@ INSERT INTO distributors (did, dname)
<para>
Insert or update new distributors as above, returning information
about any existing values that were updated, together with the new data
- inserted. Note that the returned values for <literal>old_did</literal>
- and <literal>old_dname</literal> will be <literal>NULL</literal> for
+ inserted. Note that the returned values for <structfield>old_did</structfield>
+ and <structfield>old_dname</structfield> will be <literal>NULL</literal> for
non-conflicting rows:
<programlisting>
INSERT INTO distributors (did, dname)
@@ -779,7 +779,7 @@ INSERT INTO distributors (did, dname)
when an existing, excluded row (a row with a matching constrained
column or columns after before row insert triggers fire) exists.
Example assumes a unique index has been defined that constrains
- values appearing in the <literal>did</literal> column:
+ values appearing in the <structfield>did</structfield> column:
<programlisting>
INSERT INTO distributors (did, dname) VALUES (7, 'Redline GmbH')
ON CONFLICT (did) DO NOTHING;
@@ -788,7 +788,7 @@ INSERT INTO distributors (did, dname) VALUES (7, 'Redline GmbH')
<para>
Insert or update new distributors as appropriate. Example assumes
a unique index has been defined that constrains values appearing in
- the <literal>did</literal> column. <literal>WHERE</literal> clause is
+ the <structfield>did</structfield> column. <literal>WHERE</literal> clause is
used to limit the rows actually updated (any existing row not
updated will still be locked, though):
<programlisting>
@@ -808,8 +808,8 @@ INSERT INTO distributors (did, dname) VALUES (9, 'Antwerp Design')
Insert new distributor if possible; otherwise
<literal>DO NOTHING</literal>. Example assumes a unique index has been
defined that constrains values appearing in the
- <literal>did</literal> column on a subset of rows where the
- <literal>is_active</literal> Boolean column evaluates to
+ <structfield>did</structfield> column on a subset of rows where the
+ <structfield>is_active</structfield> Boolean column evaluates to
<literal>true</literal>:
<programlisting>
-- This statement could infer a partial unique index on "did"