plpgsql: remove useless distinctions between record and row cases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: plpgsql: remove useless distinctions between record and row cases
Date: 2017-12-08 06:09:34
Message-ID: 11787.1512713374@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been fooling around with rewriting plpgsql's composite-variable
handling, along the way to getting it to handle domains over composite.
I noticed that there's some really unnecessary complication in places
where it insists on separating "row" variables from "record" variables.
More usually, we'd handle that by using a generically-typed pointer and
then doing a node-type check where it's actually necessary to distinguish;
which it turns out is exactly one place, exec_move_row(). So attached is
a simple patch that eliminates the duplicative coding.

Barring objection, I'd like to push this shortly.

regards, tom lane

Attachment Content-Type Size
collapse-record-and-row-cases.patch text/x-diff 25.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-12-08 06:24:21 Re: Speeding up pg_upgrade
Previous Message Laurenz Albe 2017-12-08 06:00:19 Re: proposal: alternative psql commands quit and exit