Re: Unsafe use of relation->rd_options without checking its type

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unsafe use of relation->rd_options without checking its type
Date: 2016-10-31 19:12:34
Message-ID: CAM3SWZRd91khYibv8Ya+Ab1KUOBgFtPbpfUS8_Tv35vvvfWN3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 31, 2016 at 11:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Now that I've seen this I wonder which other uses of rd_options are
> potentially broken. RelationIsUsedAsCatalogTable() is hardly the
> only macro that is assuming with little justification that it's
> applied to the right kind of reloptions.

It seems worth adding an assertion, at least. I wonder what running
the regression tests with a bunch of similar assertions shows up...

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-10-31 19:17:37 Fix bug in handling of dropped columns in pltcl triggers
Previous Message Tom Lane 2016-10-31 18:57:07 Unsafe use of relation->rd_options without checking its type