Re: int4 or int32

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: int4 or int32
Дата
Msg-id 200101230224.VAA28664@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: int4 or int32  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Done.

> Bruce Momjian <pgman@candle.pha.pa.us> 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
> Interval etc. is hardwired over in pg_type.h.  Use "int32", or
> perhaps revert these to int4.
>
>             regards, tom lane
>


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
? config.log
? config.cache
? config.status
? GNUmakefile
? src/Makefile.custom
? src/GNUmakefile
? src/Makefile.global
? src/log
? src/crtags
? src/backend/postgres
? src/backend/catalog/global.description
? src/backend/catalog/global.bki
? src/backend/catalog/template1.bki
? src/backend/catalog/template1.description
? src/backend/port/Makefile
? src/bin/initdb/initdb
? src/bin/initlocation/initlocation
? src/bin/ipcclean/ipcclean
? src/bin/pg_config/pg_config
? src/bin/pg_ctl/pg_ctl
? src/bin/pg_dump/pg_dump
? src/bin/pg_dump/pg_restore
? src/bin/pg_dump/pg_dumpall
? src/bin/pg_id/pg_id
? src/bin/pg_passwd/pg_passwd
? src/bin/pgaccess/pgaccess
? src/bin/pgtclsh/Makefile.tkdefs
? src/bin/pgtclsh/Makefile.tcldefs
? src/bin/pgtclsh/pgtclsh
? src/bin/pgtclsh/pgtksh
? src/bin/psql/psql
? src/bin/scripts/createlang
? src/include/config.h
? src/include/stamp-h
? src/interfaces/ecpg/lib/libecpg.so.3.2.0
? src/interfaces/ecpg/preproc/ecpg
? src/interfaces/libpgeasy/libpgeasy.so.2.1
? src/interfaces/libpgtcl/libpgtcl.so.2.1
? src/interfaces/libpq/libpq.so.2.1
? src/interfaces/perl5/blib
? src/interfaces/perl5/Makefile
? src/interfaces/perl5/pm_to_blib
? src/interfaces/perl5/Pg.c
? src/interfaces/perl5/Pg.bs
? src/pl/plperl/blib
? src/pl/plperl/Makefile
? src/pl/plperl/pm_to_blib
? src/pl/plperl/SPI.c
? src/pl/plperl/plperl.bs
? src/pl/plpgsql/src/libplpgsql.so.1.0
? src/pl/tcl/Makefile.tcldefs
Index: src/include/utils/date.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/utils/date.h,v
retrieving revision 1.8
diff -c -r1.8 date.h
*** src/include/utils/date.h    2001/01/23 01:48:17    1.8
--- src/include/utils/date.h    2001/01/23 02:23:55
***************
*** 25,31 ****
  {
      double        time;            /* all time units other than months and
                                   * years */
!     int            zone;            /* numeric time zone, in seconds */
  } TimeTzADT;

  /*
--- 25,31 ----
  {
      double        time;            /* all time units other than months and
                                   * years */
!     int32        zone;            /* numeric time zone, in seconds */
  } TimeTzADT;

  /*
Index: src/include/utils/timestamp.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/utils/timestamp.h,v
retrieving revision 1.12
diff -c -r1.12 timestamp.h
*** src/include/utils/timestamp.h    2001/01/23 01:48:17    1.12
--- src/include/utils/timestamp.h    2001/01/23 02:23:55
***************
*** 36,42 ****
  typedef struct
  {
      double        time;    /* all time units other than months and years */
!     int        month;    /* months and years, after time for alignment */
  } Interval;


--- 36,42 ----
  typedef struct
  {
      double        time;    /* all time units other than months and years */
!     int32        month;    /* months and years, after time for alignment */
  } Interval;



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: int4 or int32
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)