)
<returnvalue>integer</returnvalue>
</para>
<para>
Returns the number of null arguments.
</para>
<para>
<literal>num_nulls(1, NULL, 2)</literal>
<returnvalue>1</returnvalue>
</para></entry>
</row>
</tbody>
</tgroup>
</table>
</sect1>
<sect1 id="functions-math">
<title>Mathematical Functions and Operators</title>
<para>
Mathematical operators are provided for many
<productname>PostgreSQL</productname> types. For types without
standard mathematical conventions
(e.g., date/time types) we
describe the actual behavior in subsequent sections.
</para>
<para>
<xref linkend="functions-math-op-table"/> shows the mathematical
operators that are available for the standard numeric types.
Unless otherwise noted, operators shown as
accepting <replaceable>numeric_type</replaceable> are available for all
the types <type>smallint</type>, <type>integer</type>,
<type>bigint</type>, <type>numeric</type>, <type>real</type>,
and <type>double precision</type>.
Operators shown as accepting <replaceable>integral_type</replaceable>
are available for the types <type>smallint</type>, <type>integer</type>,
and <type>bigint</type>.
Except where noted, each form of an operator returns the same data type
as its argument(s). Calls involving multiple argument data types, such
as <type>integer</type> <literal>+</literal> <type>numeric</type>,
are resolved by using the type appearing later in these lists.
</para>
<table id="functions-math-op-table">
<title>Mathematical Operators</title>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Operator
</para>
<para>
Description
</para>
<para>
Example(s)
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<replaceable>numeric_type</replaceable> <literal>+</literal> <replaceable>numeric_type</replaceable>
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Addition
</para>
<para>
<literal>2 + 3</literal>
<returnvalue>5</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<literal>+</literal> <replaceable>numeric_type</replaceable>
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Unary plus (no operation)
</para>
<para>
<literal>+ 3.5</literal>
<returnvalue>3.5</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<replaceable>numeric_type</replaceable> <literal>-</literal> <replaceable>numeric_type</replaceable>
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Subtraction
</para>
<para>
<literal>2 - 3</literal>
<returnvalue>-1</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<literal>-</literal> <replaceable>numeric_type</replaceable>
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Negation
</para>
<para>
<literal>- (-4)</literal>
<returnvalue>4</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<replaceable>numeric_type</replaceable> <literal>*</literal> <replaceable>numeric_type</replaceable>
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Multiplication