postgresql/src/backend
Tom Lane c5dd8ead40 More fixes for lossy-GiST-distance-functions patch.
Paul Ramsey reported that commit 35fcb1b3d0
induced a core dump on commuted ORDER BY expressions, because it was
assuming that the indexorderby expression could be found verbatim in the
relevant equivalence class, but it wasn't there.  We really don't need
anything that complicated anyway; for the data types likely to be used for
index ORDER BY operators in the foreseeable future, the exprType() of the
ORDER BY expression will serve fine.  (The case where we'd have to work
harder is where the ORDER BY expression's result is only binary-compatible
with the declared input type of the ordering operator; long before worrying
about that, one would need to get rid of GiST's hard-wired assumption that
said datatype is float8.)

Aside from fixing that crash and adding a regression test for the case,
I did some desultory code review:

nodeIndexscan.c was likewise overthinking how hard it ought to work to
identify the datatype of the ORDER BY expressions.

Add comments explaining how come nodeIndexscan.c can get away with
simplifying assumptions about NULLS LAST ordering and no backward scan.

Revert no-longer-needed changes of find_ec_member_for_tle(); while the
new definition was no worse than the old, it wasn't better either, and
it might cause back-patching pain.

Revert entirely bogus additions to genam.h.
2015-05-21 19:47:48 -04:00
..
access Make recovery_target_action = pause work. 2015-05-21 13:56:17 +09:00
bootstrap Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
catalog Collection of typo fixes. 2015-05-20 16:56:22 +03:00
commands Fix more typos in comments. 2015-05-20 19:45:43 +03:00
executor More fixes for lossy-GiST-distance-functions patch. 2015-05-21 19:47:48 -04:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib More portability fixing for bipartite_match.c. 2015-05-16 11:35:42 -04:00
libpq Check return values of sensitive system library calls. 2015-05-18 10:02:31 -04:00
main Don't require users of src/port/gettimeofday.c to initialize it. 2015-02-21 12:17:04 -05:00
nodes Refactor ON CONFLICT index inference parse tree representation. 2015-05-19 21:21:27 +02:00
optimizer More fixes for lossy-GiST-distance-functions patch. 2015-05-21 19:47:48 -04:00
parser Another typo fix. 2015-05-20 14:50:22 -04:00
po Translation updates 2015-02-01 23:23:40 -05:00
port Collection of typo fixes. 2015-05-20 16:56:22 +03:00
postmaster Fix more typos in comments. 2015-05-20 19:45:43 +03:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Fix more typos in comments. 2015-05-20 19:45:43 +03:00
rewrite Support GROUPING SETS, CUBE and ROLLUP. 2015-05-16 03:46:31 +02:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Improve packing/alignment annotation for ItemPointerData. 2015-05-21 17:21:46 -04:00
tcop Support VERBOSE option in REINDEX command. 2015-05-15 20:09:57 +09:00
tsearch Collection of typo fixes. 2015-05-20 16:56:22 +03:00
utils Collection of typo fixes. 2015-05-20 16:56:22 +03:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00