| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Sergiy Vyshnevetskiy <serg(at)vostok(dot)net> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #2948: default null values for not-null domains |
| Date: | 2007-02-01 19:28:14 |
| Message-ID: | 22892.1170358094@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Sergiy Vyshnevetskiy <serg(at)vostok(dot)net> writes:
> If input function IS strict then nulls are ALWAYS accepted.
> If input function IS NOT strict then nulls MIGHT be rejectted.
> And the patch is much more simple now (attached).
> Is that it?
Almost right. exec_assign_value() thinks its isNull argument is the
null flag for the *source* value (not sure why it's pass by reference).
As you set it up, var->isnull would be aliased by *isNull, which might
manage to break things within that function if the code were ever
rearranged.
Also, some comments are usually a good idea (if the purpose were
obvious, it'd have been right the first time, no?), and you always need
to check the regression tests --- it turns out that the wrong behavior
was actually being exposed by the tests.
Patch as-applied is attached.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 3.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-02-01 19:35:17 | Re: BUG #2954: null is not checked against domain constraints in return clause |
| Previous Message | Sergiy Vyshnevetskiy | 2007-02-01 18:10:02 | Re: BUG #2948: default null values for not-null domains |