Re: [PATCH][PROPOSAL] Add enum releation option type
От | Nikolay Shaplov |
---|---|
Тема | Re: [PATCH][PROPOSAL] Add enum releation option type |
Дата | |
Msg-id | 2049090.vyOS18DeL7@x200m обсуждение исходный текст |
Ответ на | Re: [PATCH][PROPOSAL] Add enum releation option type (Alvaro Herrera from 2ndQuadrant <alvherre@postgresql.org>) |
Ответы |
Re: [PATCH][PROPOSAL] Add enum releation option type
Re: [PATCH][PROPOSAL] Add enum releation option type Re: [PATCH][PROPOSAL] Add enum releation option type |
Список | pgsql-hackers |
В письме от четверг, 5 сентября 2019 г. 11:42:27 MSK пользователь Alvaro Herrera from 2ndQuadrant написал: > After looking closer once again, I don't like this patch. > > I think the FOOBAR_ENUM_DEF defines serve no purpose, other than > source-code placement next to the enum value definitions. I think for > example check_option, living in reloptions.c, should look like this: This sounds as a good idea, I tried it, but did not succeed. When I do as you suggest I get a bunch of warnings, and more over it, tests do not pass afterwards. reloptions.c:447:3: warning: braces around scalar initializer { ^ reloptions.c:447:3: warning: (near initialization for ‘enumRelOpts[0].members’) reloptions.c:448:4: warning: braces around scalar initializer { "on", GIST_OPTION_BUFFERING_ON }, ^ reloptions.c:448:4: warning: (near initialization for ‘enumRelOpts[0].members’) reloptions.c:448:4: warning: initialization from incompatible pointer type reloptions.c:448:4: warning: (near initialization for ‘enumRelOpts[0].members’) and so on, see full warning list attached. I've played with it around, and did some googling, but without much success. If we are moving this way (an this way seems to be good one), I need you help, because this thing is beyond my C knowledge, I will not manage it myself. I also attached a diff of what I have done to get these warnings. It should be applied to latest version of patch we are discussing.
Вложения
В списке pgsql-hackers по дате отправления: