|
|
|
@ -2479,17 +2479,12 @@ SELECT getf1(CAST(ROW(11,'this is a test',2.5) AS myrowtype)); |
|
|
|
|
<para> |
|
|
|
|
Row constructors can be used to build composite values to be stored |
|
|
|
|
in a composite-type table column, or to be passed to a function that |
|
|
|
|
accepts a composite parameter. Also, |
|
|
|
|
it is possible to compare two row values or test a row with |
|
|
|
|
<literal>IS NULL</literal> or <literal>IS NOT NULL</literal>, for example: |
|
|
|
|
<programlisting> |
|
|
|
|
SELECT ROW(1,2.5,'this is a test') = ROW(1, 3, 'not the same'); |
|
|
|
|
|
|
|
|
|
SELECT ROW(table.*) IS NULL FROM table; -- detect all-null rows |
|
|
|
|
</programlisting> |
|
|
|
|
For more detail see <xref linkend="functions-comparisons"/>. |
|
|
|
|
Row constructors can also be used in connection with subqueries, |
|
|
|
|
as discussed in <xref linkend="functions-subquery"/>. |
|
|
|
|
accepts a composite parameter. Also, it is possible to test rows |
|
|
|
|
using the standard comparison operators as described in <xref |
|
|
|
|
linkend="functions-comparison"/>, to compare one row against another |
|
|
|
|
as described in <xref linkend="functions-comparisons"/>, and to |
|
|
|
|
use them in connection with subqueries, as discussed in <xref |
|
|
|
|
linkend="functions-subquery"/>, |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
</sect2> |
|
|
|
|