Re: [BUGS] [HACKERS] object_classes array is broken, again

2016-11-29 Thread Alvaro Herrera
Alvaro Herrera wrote: > Jaimin Pan wrote: > > Hi all, > > > > How about this patch. I believe it will never missing someone and be > > detected while compiling. > > Hmm, yeah this looks like something that's worth considering going > forward. I can't think of any reason not to do this. Perhaps

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-23 Thread Jaimin Pan
Hi all, How about this patch. I believe it will never missing someone and be detected while compiling. 2015-07-21 19:38 GMT+08:00 Alvaro Herrera : > Tom Lane wrote: > > I wrote: > > > +1 to this patch, in fact I think we could remove MAX_OCLASS altogether > > > which would be very nice for switc

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-21 Thread Alvaro Herrera
Jaimin Pan wrote: > Hi all, > > How about this patch. I believe it will never missing someone and be > detected while compiling. Hmm, yeah this looks like something that's worth considering going forward. I can't think of any reason not to do this. Perhaps we can write getObjectClass using this

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-21 Thread Alvaro Herrera
Tom Lane wrote: > I wrote: > > +1 to this patch, in fact I think we could remove MAX_OCLASS altogether > > which would be very nice for switch purposes. > > Oh, wait, I forgot that the patch itself introduces another reference to > MAX_OCLASS. I wonder though if we should get rid of that as an en

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-20 Thread Tom Lane
I wrote: > +1 to this patch, in fact I think we could remove MAX_OCLASS altogether > which would be very nice for switch purposes. Oh, wait, I forgot that the patch itself introduces another reference to MAX_OCLASS. I wonder though if we should get rid of that as an enum value in favor of #define

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-20 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> What about adding StaticAsserts that lengthof() the relevant constant >> arrays is equal to MAX_OCLASS? (Or other similar ways of checking >> that they have the right number of entries.) > Well, the array itself is declared like this: > static co

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-20 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Any opinions on this idea? I don't like it all that much, but it's > > plenty effective. > > I don't like it much either. > > What about adding StaticAsserts that lengthof() the relevant constant > arrays is equal to MAX_OCLASS? (Or other similar wa

Re: [BUGS] [HACKERS] object_classes array is broken, again

2015-07-20 Thread Tom Lane
Alvaro Herrera writes: > Any opinions on this idea? I don't like it all that much, but it's > plenty effective. I don't like it much either. What about adding StaticAsserts that lengthof() the relevant constant arrays is equal to MAX_OCLASS? (Or other similar ways of checking that they have th