Re: [HACKERS] IntArray in c.h

2010-01-02 Thread Hitoshi Harada
2010/1/2 Peter Eisentraut : > On tor, 2009-12-31 at 11:28 -0500, Tom Lane wrote: >> Peter Eisentraut writes: >> > The definition of c.h is bogus anyway.  You might think it contains >> > includes and defines to set up a portable C environment, which is what >> > the first half indeed does. >> >> >

Re: [HACKERS] IntArray in c.h

2010-01-01 Thread Peter Eisentraut
On tor, 2009-12-31 at 11:28 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > The definition of c.h is bogus anyway. You might think it contains > > includes and defines to set up a portable C environment, which is what > > the first half indeed does. > > > But then things like regproc, tran

Re: [HACKERS] IntArray in c.h

2009-12-31 Thread Tom Lane
Peter Eisentraut writes: > The definition of c.h is bogus anyway. You might think it contains > includes and defines to set up a portable C environment, which is what > the first half indeed does. > But then things like regproc, transaction ID types, IntArray, varlena, > bytea, oidvector, NameDa

Re: [HACKERS] IntArray in c.h

2009-12-31 Thread Peter Eisentraut
On ons, 2009-12-30 at 11:46 +0900, Hitoshi Harada wrote: > 2009/12/30 Tom Lane : > > Hitoshi Harada writes: > >> I found the struct IntArray defined in c.h is actually used only in > >> execQual.c. ISTM the definition should be at least moved to the right > >> place. > > > > It's a general-purpose

Re: [HACKERS] IntArray in c.h

2009-12-29 Thread Hitoshi Harada
2009/12/30 Tom Lane : > Hitoshi Harada writes: >> I found the struct IntArray defined in c.h is actually used only in >> execQual.c. ISTM the definition should be at least moved to the right >> place. > > It's a general-purpose datatype that might be used anywhere that array > indexing happens.  I

Re: [HACKERS] IntArray in c.h

2009-12-29 Thread Tom Lane
Hitoshi Harada writes: > I found the struct IntArray defined in c.h is actually used only in > execQual.c. ISTM the definition should be at least moved to the right > place. It's a general-purpose datatype that might be used anywhere that array indexing happens. I think the fact that it's curren

[HACKERS] IntArray in c.h

2009-12-29 Thread Hitoshi Harada
I found the struct IntArray defined in c.h is actually used only in execQual.c. ISTM the definition should be at least moved to the right place. Attached is a trivial fix. Addition to the explanation above, I replaced IntArray by simple int array bounded with MAXDIM and remove local variable lInd