- Notifications
You must be signed in to change notification settings - Fork28
Commit51db0d1
committed
Fix plpgsql to enforce domain checks when returning a NULL domain value.
If a plpgsql function is declared to return a domain type, and the domain'sconstraints forbid a null value, it was nonetheless possible to returnNULL, because we didn't bother to check the constraints for a null result.I'd noticed this while fooling with domains-over-composite, but had notgotten around to fixing it immediately.Add a regression test script exercising this and various other domaincases, largely borrowed from the plpython_types test.Although this is clearly a bug fix, I'm not sure whether anyone wouldthank us for changing the behavior in stable branches, so I'm inclinednot to back-patch.1 parent439c7bc commit51db0d1
File tree
6 files changed
+698
-1
lines changed- src/pl/plpgsql/src
- expected
- sql
6 files changed
+698
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments
Comments
(0)