postgresql/src/backend
Tom Lane 37d6d07dda Throw error for indeterminate collation of an ORDER/GROUP/DISTINCT target.
This restores a parse error that was thrown (though only in the ORDER BY
case) by the original collation patch.  I had removed it in my recent
revisions because it was thrown at a place where collations now haven't
been computed yet; but I thought of another way to handle it.

Throwing the error at parse time, rather than leaving it to be done at
runtime, is good because a syntax error pointer is helpful for localizing
the problem.  We can reasonably assume that the comparison function for a
collatable datatype will complain if it doesn't have a collation to use.
Now the planner might choose to implement GROUP or DISTINCT via hashing,
in which case no runtime error would actually occur, but it seems better
to throw error consistently rather than let the error depend on what the
planner chooses to do.  Another possible objection is that the user might
specify a nondefault sort operator that doesn't care about collation
... but that's surely an uncommon usage, and it wouldn't hurt him to throw
in a COLLATE clause anyway.  This change also makes the ORDER BY/GROUP
BY/DISTINCT case more consistent with the UNION/INTERSECT/EXCEPT case,
which was already coded to throw this error even though the same objections
could be raised there.
2011-03-22 15:58:03 -04:00
..
access When two base backups are started at the same time with pg_basebackup, 2011-03-21 11:25:25 +02:00
bootstrap Per-column collation support 2011-02-08 23:04:18 +02:00
catalog Revise collation derivation method and expression-tree representation. 2011-03-19 20:30:08 -04:00
commands Revise collation derivation method and expression-tree representation. 2011-03-19 20:30:08 -04:00
executor Revise collation derivation method and expression-tree representation. 2011-03-19 20:30:08 -04:00
foreign Implement an API to let foreign-data wrappers actually be functional. 2011-02-20 00:18:14 -05:00
lib Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq Suppress platform-dependent unused-variable warning. 2011-03-20 13:34:31 -04:00
main Use "backend process" rather than "backend server", where appropriate. 2011-03-12 09:38:56 -05:00
nodes Reimplement planner's handling of MIN/MAX aggregate optimization (again). 2011-03-22 00:34:31 -04:00
optimizer Reimplement planner's handling of MIN/MAX aggregate optimization (again). 2011-03-22 00:34:31 -04:00
parser Throw error for indeterminate collation of an ORDER/GROUP/DISTINCT target. 2011-03-22 15:58:03 -04:00
po Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
port Be less detailed about reporting shared memory failure by avoiding the 2011-02-27 12:21:58 -05:00
postmaster Move synchronous_standbys_defined updates from WAL writer to BG writer. 2011-03-18 21:43:45 -04:00
regex Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
replication Move synchronous_standbys_defined updates from WAL writer to BG writer. 2011-03-18 21:43:45 -04:00
rewrite Support data-modifying commands (INSERT/UPDATE/DELETE) in WITH. 2011-02-25 18:58:02 -05:00
snowball Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
storage Minor sync rep corrections. 2011-03-10 14:57:02 -05:00
tcop Fix various possible problems with synchronous replication. 2011-03-17 13:12:21 -04:00
tsearch Fix tsmatchsel() to account properly for null rows. 2011-02-17 19:00:49 -05:00
utils Avoid potential deadlock in InitCatCachePhase2(). 2011-03-22 13:00:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile replication/repl_gram.h needs to be cleaned too ... 2011-03-10 00:12:38 -05:00
common.mk Workaround for recursive make breakage 2011-01-13 09:32:06 +02:00
nls.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00