Re: [GENERAL] Puzzled by UNION with unknown types

2017-09-20 Thread Ken Tanzer
Thanks Tom! -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ * *https://agency-software.org/demo/client * ken.tan...@agency-software.org (253) 245-3801 Subscribe to the

Re: [GENERAL] Puzzled by UNION with unknown types

2017-09-20 Thread Tom Lane
Ken Tanzer writes: > Hi. I've solved my practical problems, and I know unknown types are > just bad, but am still curious about why some of these cause errors, > and others don't. > ag_consulting=> SELECT * FROM (SELECT '1'::unknown) foo UNION ALL > SELECT * FROM (SELECT

[GENERAL] Puzzled by UNION with unknown types

2017-09-20 Thread Ken Tanzer
Hi. I've solved my practical problems, and I know unknown types are just bad, but am still curious about why some of these cause errors, and others don't. It seems contingent on whether the value is generated on the fly, but I don't understand the mechanism or distinction. Any help appreciated!