forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit15026ab
committed
Fix conversion of domains to JSON in 9.3 and 9.2.
In commit0ca6bda, I rewrote the json.ccode that decided how to convert SQL data types into JSON values, so thatit no longer relied on typcategory which is a pretty untrustworthy guideto the output format of user-defined datatypes. However, I overlooked thefact that CREATE DOMAIN inherits typcategory from the base type, so thatthe old coding did have the desirable property of treating domains liketheir base types --- but only in some cases, because not all its decisionsturned on typcategory. The version of the patch that went into 9.4 andup did a getBaseType() call to ensure that domains were always treatedlike their base types, but I omitted that from the older branches, becauseit would result in a behavioral change for domains over json or hstore;a change that's arguably a bug fix, but nonetheless a change that usershad not asked for. What I overlooked was that this meant that domainsover numerics and boolean were no longer treated like their base types,and that we *did* get a complaint about, ie bug #11103 from David Grelaud.So let's do the getBaseType() call in the older branches as well, torestore their previous behavior in these cases. That means 9.2 and 9.3will now make these decisions just like 9.4. We could probably klugethings to still ignore the domain's base type if it's json etc, but thatseems a bit silly.1 parentb4dacab commit15026ab
1 file changed
+2
-3
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
843 | 843 |
| |
844 | 844 |
| |
845 | 845 |
| |
846 |
| - | |
847 |
| - | |
848 |
| - | |
| 846 | + | |
| 847 | + | |
849 | 848 |
| |
850 | 849 |
| |
851 | 850 |
| |
|
0 commit comments
Comments
(0)