PostgreSQL calling function with a null parameter
<p>I have a function that updates a row:</p>

<pre><code>CREATE OR REPLACE FUNCTION MyTable_UPDATE 
(
   _ID int,
   _Description text
) 
RETURNS bool
AS $$
DECLARE _OK boolean;

BEGIN
   _OK := false;
   UPDATE mytable SET
      Description = _Description 
   WHERE ID = _ID;
   _OK := true;

   RETURN _OK;  
END;
$$ LANGUAGE plpgsql STRICT;
</code></pre>

<p>When I call it with a value in description it works:</p>

<pre><code>select MyTable_UPDATE(9, 'testing 123');
</code></pre>

<p>If I call it with a null value, it doesn't update, there is no error message and no value is returned:</p>

<pre><code>select MyTable_UPDATE(9, null);
</code></pre>

<p>If I run an update query to set description = null, it works:</p>

<pre><code>UPDATE mytable SET
   Description = null 
WHERE ID = 9;
</code></pre>