{"shas":[["72cfc17aef4fc9aa2de1c82045b7d609c0f2c513","ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","Improve handling of unknown-type literals in UNION/INTERSECT/EXCEPT.\n\nThis patch causes unknown-type Consts to be coerced to the resolved output\ntype of the set operation at parse time.  Formerly such Consts were left\nalone until late in the planning stage.  The disadvantage of that approach\nis that it disables some optimizations, because the planner sees the set-op\nleaf query as having different output column types than the overall set-op.\nWe saw an example of that in a recent performance gripe from Claudio\nFreire.\n\nFixing such a Const requires scribbling on the leaf query in\ntransformSetOperationTree, but that should be all right since if the leaf\nquery's semantics depended on that output column, it would already have\nresolved the unknown to something else.\n\nMost of the bulk of this patch is a simple adjustment of\ntransformSetOperationTree's API so that upper levels can get at the\nTargetEntry containing a Const to be replaced: it now returns a list of\nTargetEntries, instead of just the bare expressions.","Tom Lane"]],"repo":"postgres/postgres","actor":"postgres-mirror","ref":"refs/heads/master","size":1,"head":"72cfc17aef4fc9aa2de1c82045b7d609c0f2c513","actor_gravatar":"b843ba1ea54a1b6c35a20550ad076b2b","push_id":26806114}