Skip to content

Commit a0fd578

Browse files
poloboCommitfest Bot
authored andcommitted
doc: Add an overview of NULL treatment in PostgreSQL
The handling of NULL within PostgreSQL is broad, varied, and unintuitive. This new section provides a place for the reader to go and skim over the various behaviors and stick them in the back of their mind. Some existing documentation is tweaked to be more in line with the overall flow of the material presented in this overview. The individual features do still constitute an authoritative location for describing the behaviors - but now have a more convenient place to put examples.
1 parent 4464fdd commit a0fd578

File tree

8 files changed

+1281
-160
lines changed

8 files changed

+1281
-160
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5389,7 +5389,7 @@ WHERE ...
53895389
<row>
53905390
<entry><type>unknown</type></entry>
53915391
<entry>Identifies a not-yet-resolved type, e.g., of an undecorated
5392-
string literal.</entry>
5392+
string literal. Also, the <link linkend="nullvalues-usage">null value.</link></entry>
53935393
</row>
53945394
</tbody>
53955395
</tgroup>

doc/src/sgml/ddl.sgml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ DROP TABLE products;
168168
</para>
169169
</sect1>
170170

171+
&nullvalues;
172+
171173
<sect1 id="ddl-default">
172174
<title>Default Values</title>
173175

doc/src/sgml/filelist.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<!ENTITY indices SYSTEM "indices.sgml">
2222
<!ENTITY json SYSTEM "json.sgml">
2323
<!ENTITY mvcc SYSTEM "mvcc.sgml">
24+
<!ENTITY nullvalues SYSTEM "nullvalues.sgml">
2425
<!ENTITY parallel SYSTEM "parallel.sgml">
2526
<!ENTITY perform SYSTEM "perform.sgml">
2627
<!ENTITY queries SYSTEM "queries.sgml">

doc/src/sgml/func.sgml

Lines changed: 120 additions & 153 deletions
Large diffs are not rendered by default.

doc/src/sgml/json.sgml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@
129129
the corresponding <productname>PostgreSQL</productname> types.
130130
</para>
131131

132+
<indexterm>
133+
<primary>null value</primary>
134+
<secondary sortas="json">within JSON</secondary>
135+
</indexterm>
136+
132137
<table id="json-type-mapping-table">
133138
<title>JSON Primitive Types and Corresponding <productname>PostgreSQL</productname> Types</title>
134139
<tgroup cols="3">
@@ -162,7 +167,7 @@
162167
<row>
163168
<entry><type>null</type></entry>
164169
<entry>(none)</entry>
165-
<entry>SQL <literal>NULL</literal> is a different concept</entry>
170+
<entry>An SQL null value is similar, but see <xref linkend="nullvalues-json"/> for differences.</entry>
166171
</row>
167172
</tbody>
168173
</tgroup>

0 commit comments

Comments
 (0)