pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Shaplov <dhyan@nataraj.su>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Dent John <denty@qqdd.eu>
Cc: Iwata, Aya <iwata.aya@jp.fujitsu.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: [PATCH] Add some useful asserts into View Options macroses
Date: Tue, 08 Oct 2019 13:44:25 +0300
Message-ID: <4501528.Pae3bDk7cQ@x200m> (raw)
In-Reply-To: <CA+TgmobsfF_Rr89TS-2zDVTLjbp84WLJg4-reuqvN7yNHFMg6Q@mail.gmail.com>
References: <3634983.eHpMQ1mJnI@x200m>
	<CA+TgmobsfF_Rr89TS-2zDVTLjbp84WLJg4-reuqvN7yNHFMg6Q@mail.gmail.com>

В письме от понедельник, 7 октября 2019 г. 12:59:27 MSK пользователь Robert 
Haas написал:

> > 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?

That would not be as easy as for ViewOptions. For example as for the current 
master code, fillfactor from StdRdOptions is used in Toast, Heap, Hash index, 
nbtree index, and spgist index. This will make RelationGetFillFactor macros a 
bit complicated for example.

Now I have patches that limits usage of StdRdOptions to Heap and Toast.

When StdRdOptions is not that widely used, we whould be able to add asserts 
for it, it will not make the code too complex.

So I would suggest to do ViewOptions asserts now, and keep dealing with 
StdRdOptions for later. When we are finished with my current patches, I will 
take care about it.

-- 
Software Developer: https://www.upwork.com/freelancers/~014a87e140ff02c0da
Body-oriented Therapist: https://vk.com/nataraj_rebalancing  (Russian)





view thread (5+ messages)  latest in thread

Message-ID: <4501528.Pae3bDk7cQ@x200m>
Permalink:  ../4501528.Pae3bDk7cQ@x200m/
Also on:    postgresql.org/message-id/4501528.Pae3bDk7cQ@x200m

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: dhyan@nataraj.su, robertmhaas@gmail.com, michael@paquier.xyz, tomas.vondra@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, denty@qqdd.eu, iwata.aya@jp.fujitsu.com, alvherre@2ndquadrant.com, 9erthalion6@gmail.com, thomas.munro@gmail.com
  Subject: Re: [PATCH] Add some useful asserts into View Options macroses
  In-Reply-To: <4501528.Pae3bDk7cQ@x200m>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox