Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHm4C-0005xs-1O for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Oct 2018 08:41:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHm4A-0002Nc-CJ for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Oct 2018 08:41:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHm4A-0002D5-1n for pgsql-hackers@lists.postgresql.org; Wed, 31 Oct 2018 08:41:30 +0000 Received: from ssl.nataraj.su ([195.54.209.170]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHm46-0001EX-Id for pgsql-hackers@lists.postgresql.org; Wed, 31 Oct 2018 08:41:28 +0000 Received: from x200m.localnet (unknown [91.108.35.130]) by ssl.nataraj.su (Postfix) with ESMTPSA id 67D71511E0B4; Wed, 31 Oct 2018 11:40:53 +0300 (MSK) From: Nikolay Shaplov To: pgsql-hackers@lists.postgresql.org Cc: Aleksandr Parfenov , Nikita Glukhov , Alvaro Herrera , PostgreSQL mailing lists Subject: Re: [PATCH][PROPOSAL] Add enum releation option type Date: Wed, 31 Oct 2018 11:40:48 +0300 Message-ID: <15264441.SM9BIHTig9@x200m> User-Agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) In-Reply-To: <4468901.Ii3QHyQo2l@x200m> References: <20180215213518.5btgsjhbjxlolife@alvherre.pgsql> <20180910180210.579b8303@asp437-ThinkPad-L380> <4468901.Ii3QHyQo2l@x200m> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9519453.jD8hoCmVmG"; micalg="pgp-sha256"; protocol="application/pgp-signature" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --nextPart9519453.jD8hoCmVmG Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 12 =D1=81=D0=B5= =D0=BD=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2018 21:40:49 =D0=BF=D0=BE=D0=BB=D1= =8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nikolay Shaplov =D0= =BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > 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 s= ure, > > but I think it is done to keep everything related to enum in one pl= ace > > 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 cre= ated > > without array creation itself in .h file. Can we move actual array > > creation into same .h file? What is the point to separate array con= tent > > definition and array definition? >=20 > 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 real= ly 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 ad= vice=20 was not to include this static const into .h file. Because copy of this= const=20 would be created in all objective files where this .h were included. An= d it is=20 not the best way...=20 =2D-=20 Do code for fun. --nextPart9519453.jD8hoCmVmG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJb2WqQAAoJEKc13HowK+H44X0IAJ4POQ0XvVSvuO33HWSReFqd uVCDvlW0JSIJYNiisOHcyo0K8OVnWP19Z8Zk/LunHb/pmbQU/N5qrl50Dp/zZIw2 yIkWADBoEx1toPI1Z0s0RJRiL0CrpAEFYTYBqzXJN1jvGONZx9WmgD1prvw96FXl qGjFMolJOV5qsxt1DnYg302D4Sj0LDaksbVv6QPJh/+YtYaYr+zZ+LGrWF69Sg+p VUB/x8cwc2uWa122QRl1P1pbzN7grWJ8qnueEkK0z3U+jg3Cr46olb+ClUr2UqUp pBp0i52kd3dSQh/as/7bDzMb0BuAxqdVDN+AGv51ws7e2glhspKf+ug+lRSnoFc= =jNam -----END PGP SIGNATURE----- --nextPart9519453.jD8hoCmVmG--