pgsql: Remove dead code in toast_fetch_datum_slice

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove dead code in toast_fetch_datum_slice
Date: 2018-12-10 14:32:07
Message-ID: E1gWMbP-0008NM-2H@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/96c702c1edbde8a3f5013bd0ac6c25c85710258d

Modified Files
--------------
src/backend/access/heap/tuptoaster.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2018-12-10 14:47:19 pgsql: Add additional partition tests to pg_dump
Previous Message Michael Paquier 2018-12-10 06:02:29 pgsql: Ensure cleanup of orphan archive status files