Re: [PATCH] Add some useful asserts into View Options macroses

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dent John <denty(at)qqdd(dot)eu>, "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: [PATCH] Add some useful asserts into View Options macroses
Date: 2019-10-07 16:59:27
Message-ID: CA+TgmobsfF_Rr89TS-2zDVTLjbp84WLJg4-reuqvN7yNHFMg6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 5, 2019 at 5:23 PM Nikolay Shaplov <dhyan(at)nataraj(dot)su> wrote:
> This thread is a follow up to the thread https://www.postgresql.org/message-id/2620882.s52SJui4ql@x200m where I've been trying to remove StdRdOptions
> structure and replace it with unique structure for each relation kind.
>
> I've decided to split that patch into smaller parts.
>
> This part adds some asserts to ViewOptions macroses.
> Since an option pointer there is converted into (ViewOptions *) it would be
> really good to make sure that this macros is called in proper context, and we
> do the convertation properly. At least when running tests with asserts turned
> on.

Seems like a good idea. Should we try to do something similar for the
macros in that header file that cast to StdRdOptions?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2019-10-07 17:18:00 Re: recovery_min_apply_delay in archive recovery causes assertion failure in latch
Previous Message Tom Lane 2019-10-07 16:56:29 Re: How to retain lesser paths at add_path()?