1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Fix tqueue.c's range-remapping code.

It's depressingly clear that nobody ever tested this.
This commit is contained in:
Tom Lane
2016-07-29 14:13:19 -04:00
parent 80b346c208
commit bf4ae685ae
3 changed files with 33 additions and 2 deletions

View File

@ -371,7 +371,7 @@ tqueueWalkRange(TQueueDestReceiver *tqueue, Datum value)
* called in the first place: GetRemapClass should have returned NULL when
* asked about this range type.
*/
remapclass = GetRemapClass(typeid);
remapclass = GetRemapClass(typcache->rngelemtype->type_id);
Assert(remapclass != TQUEUE_REMAP_NONE);
/* Walk each bound, if present. */
@ -749,7 +749,7 @@ TupleQueueRemapRange(TupleQueueReader *reader, Datum value)
* called in the first place: GetRemapClass should have returned NULL when
* asked about this range type.
*/
remapclass = GetRemapClass(typeid);
remapclass = GetRemapClass(typcache->rngelemtype->type_id);
Assert(remapclass != TQUEUE_REMAP_NONE);
/* Remap each bound, if present. */