Remove dead code in toast_fetch_datum_slice

Stephen Frost <sfrost@snowman.net>

Commit: 96c702c1edbde8a3f5013bd0ac6c25c85710258d
Author: Stephen Frost <sfrost@snowman.net>
Date: 2018-12-10T14:31:38Z
Releases: 12.0
Remove dead code in toast_fetch_datum_slice

In toast_fetch_datum_slice(), we Assert() that what is passed in isn't
compressed, but we then later had a check to see what the length of if
what was passed in is compressed.  That later check is rather confusing
since toast_fetch_datum_slice() is only ever called with non-compressed
datums and the Assert() earlier makes it clear that one shouldn't be
passing in compressed datums.

Add a comment to make it clear that toast_fetch_datum_slice() is just
for non-compressed datums, and remove the dead code.

Files

PathChange+/−
src/backend/access/heap/tuptoaster.c modified +3 −4