postgresql/src
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
..
backend Throw error for indeterminate collation of an ORDER/GROUP/DISTINCT target. 2011-03-22 15:58:03 -04:00
bin Fix up handling of C/POSIX collations. 2011-03-20 12:44:13 -04:00
include Reimplement planner's handling of MIN/MAX aggregate optimization (again). 2011-03-22 00:34:31 -04:00
interfaces In ecpg preprocessor, don't try to look up constants in the test for 2011-03-11 17:27:57 +02:00
makefiles Allow make check in PL directories 2011-02-15 06:52:12 +02:00
pl Revise collation derivation method and expression-tree representation. 2011-03-19 20:30:08 -04:00
port Fix up handling of C/POSIX collations. 2011-03-20 12:44:13 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Throw error for indeterminate collation of an ORDER/GROUP/DISTINCT target. 2011-03-22 15:58:03 -04:00
timezone Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tools Add comment to tools/git-external-diff. 2011-03-11 05:06:31 -05:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Allow make check in PL directories 2011-02-15 06:52:12 +02:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00