From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: plpgsql's exec_simple_cast_value() mistakenly supposed that it |
Date: | 2009-04-02 01:16:25 |
Message-ID: | 20090402011625.29DCE754ADE@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
plpgsql's exec_simple_cast_value() mistakenly supposed that it could bypass
casting effort whenever the input value was NULL. However this prevents
application of not-null domain constraints in the cases that use this
function, as illustrated in bug #4741. Since this function isn't meant
for use in performance-critical paths anyway, this certainly seems like
another case of "premature optimization is the root of all evil".
Back-patch as far as 8.2; older versions made no effort to enforce
domain constraints here anyway.
Tags:
----
REL8_2_STABLE
Modified Files:
--------------
pgsql/src/pl/plpgsql/src:
pl_exec.c (r1.180.2.9 -> r1.180.2.10)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.180.2.9&r2=1.180.2.10)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-04-02 03:51:43 | pgsql: Fix GUC's reports of assign_hook failure to always include the |
Previous Message | Tom Lane | 2009-04-02 01:16:17 | pgsql: plpgsql's exec_simple_cast_value() mistakenly supposed that it |