pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@lists.postgresql.org
Cc: Aleksandr Parfenov <a.parfenov@postgrespro.ru>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
Date: Wed, 31 Oct 2018 11:40:48 +0300
Message-ID: <15264441.SM9BIHTig9@x200m> (raw)
In-Reply-To: <4468901.Ii3QHyQo2l@x200m>
References: <20180215213518.5btgsjhbjxlolife@alvherre.pgsql>
	<20180910180210.579b8303@asp437-ThinkPad-L380>
	<4468901.Ii3QHyQo2l@x200m>

В письме от 12 сентября 2018 21:40:49 пользователь Nikolay Shaplov написал:
> > As you mentioned in previous mail, you prefer to keep enum and
> > relopt_enum_element_definition array in the same .h file. I'm not sure,
> > but I think it is done to keep everything related to enum in one place
> > to avoid inconsistency in case of changes in some part (e.g. change of
> > enum without change of array). On the other hand, array content created
> > without array creation itself in .h file. Can we move actual array
> > creation into same .h file? What is the point to separate array content
> > definition and array definition?
> 
> Hm... This would be good. We really can do it? ;-) I am not C-expert, some
> aspects of C-development is still mysterious for me. So if it is really ok
> to create array in .h file, I would be happy to move it there  (This patch
> does not include this change, I still want to be sure we can do it)
I've discussed this issue with a colleague, who IS C-expert, and his advice 
was not to include this static const into .h file. Because copy of this const 
would be created in all objective files where this .h were included. And it is 
not the best way... 

-- 
Do code for fun.

Attachments:

  [application/pgp-signature] signature.asc (472B, ../15264441.SM9BIHTig9@x200m/2-signature.asc)
  download

view thread (40+ messages)  latest in thread

Message-ID: <15264441.SM9BIHTig9@x200m>
Permalink:  ../15264441.SM9BIHTig9@x200m/
Also on:    postgresql.org/message-id/15264441.SM9BIHTig9@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, pgsql-hackers@lists.postgresql.org, a.parfenov@postgrespro.ru, n.gluhov@postgrespro.ru, alvherre@alvh.no-ip.org
  Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
  In-Reply-To: <15264441.SM9BIHTig9@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