]> granicus.if.org Git - postgresql/commit
Allow GROUP BY, ORDER BY, DISTINCT targets to be unknown literals,
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Jun 2003 02:03:38 +0000 (02:03 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Jun 2003 02:03:38 +0000 (02:03 +0000)
commita4997254693057d4587d74222881b8e03580da2c
treec022e641ec691ce3f108b28e0720444da6ed3eef
parentcb02610e503957d7ed9b4375537fb6275c16f1fa
Allow GROUP BY, ORDER BY, DISTINCT targets to be unknown literals,
silently resolving them to type TEXT.  This is comparable to what we
do when faced with UNKNOWN in CASE, UNION, and other contexts.  It gets
rid of this and related annoyances:
select distinct f1, '' from int4_tbl;
ERROR:  Unable to identify an ordering operator '<' for type unknown
This was discussed many moons ago, but no one got round to fixing it.
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/parser/analyze.c
src/backend/parser/parse_clause.c
src/include/parser/parse_clause.h