Re: AW: [HACKERS] int4 or int32

2001-01-23 Thread Bruce Momjian
[ Charset ISO-8859-1 unsupported, converting... ] > > > There were only a few to fix, so I fixed them. > > > > > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > > > Which one of these should we use? > > > > int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no > > > > DatumGetInt64; i

AW: [HACKERS] int4 or int32

2001-01-23 Thread Zeugswetter Andreas SB
> There were only a few to fix, so I fixed them. > > > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > > Which one of these should we use? > > > int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no > > > DatumGetInt64; it also has DatumGetInt32 but no > DatumGetInt4. fmgr has Wait

Re: [HACKERS] int4 or int32

2001-01-22 Thread Bruce Momjian
Done. > Bruce Momjian <[EMAIL PROTECTED]> writes: > > There were only a few to fix, so I fixed them. > > I don't think it's a good idea to write unspecified-width "int" in > the struct decls for Interval and friends. If the compiler decides > someday that that's int8, things break because the

Re: [HACKERS] int4 or int32

2001-01-22 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > There were only a few to fix, so I fixed them. I don't think it's a good idea to write unspecified-width "int" in the struct decls for Interval and friends. If the compiler decides someday that that's int8, things break because the physical size of Int

Re: [HACKERS] int4 or int32

2001-01-22 Thread Bruce Momjian
There were only a few to fix, so I fixed them. > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Which one of these should we use? > > int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no > > DatumGetInt64; it also has DatumGetInt32 but no DatumGetInt4. fmgr has > > PG_GETARG_INT32

Re: [HACKERS] int4 or int32

2000-11-15 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > >> I think that int32 etc are better choices at the C level because of > >> the well-established precedent for naming integer types after numbers > >> of bits in C code. I don't feel any strong urge to go around and > >> change the existing misusages,

Re: [HACKERS] int4 or int32

2000-11-15 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: >> I think that int32 etc are better choices at the C level because of >> the well-established precedent for naming integer types after numbers >> of bits in C code. I don't feel any strong urge to go around and >> change the existing misusages, but if yo

Re: [HACKERS] int4 or int32

2000-11-15 Thread Bruce Momjian
> Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Which one of these should we use? > > int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no > > DatumGetInt64; it also has DatumGetInt32 but no DatumGetInt4. fmgr has > > PG_GETARG_INT32 et al. Inconsistency everywhere. > > The origin

Re: [HACKERS] int4 or int32

2000-11-15 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Which one of these should we use? > int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no > DatumGetInt64; it also has DatumGetInt32 but no DatumGetInt4. fmgr has > PG_GETARG_INT32 et al. Inconsistency everywhere. The original convention

[HACKERS] int4 or int32

2000-11-15 Thread Peter Eisentraut
Which one of these should we use? int4 is a data type, int32 isn't. c.h has DatumGetInt8, but no DatumGetInt64; it also has DatumGetInt32 but no DatumGetInt4. fmgr has PG_GETARG_INT32 et al. Inconsistency everywhere. The C standard has things like int32_t, but technically there's no guarantee