Re: Remove pg_strtouint64(), use strtoull() directly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove pg_strtouint64(), use strtoull() directly
Дата
Msg-id 826278.1639410399@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove pg_strtouint64(), use strtoull() directly  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Remove pg_strtouint64(), use strtoull() directly  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I really am glad they haven't. I think it's super-annoying that we
> need hacks like UINT64_FORMAT all over the place. I think it was a
> mistake not to nail down the size that each type is expected to be in
> the original C standard,

Well, mumble.  One must remember that when C was designed, there was
a LOT more variability in hardware designs than we see today.  They
could not have put a language with fixed ideas about datatype widths
onto, say, PDP-10s (36-bit words) or Crays (60-bit, IIRC).  But it
is a darn shame that people weren't more consistent about mapping
the C types onto machines with S/360-like addressing.

> and making more changes to the conventions
> now would cause a whole bunch of unnecessary code churn, probably for
> almost everybody using C.

The error in your thinking is believing that there *is* a convention.
There isn't; see "long".

Anyway, my point is that we have created a set of type names that
have the semantics we want, and we should avoid confusing those with
underlying C types that are *not* guaranteed to be the same thing.

            regards, tom lane



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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Failed transaction statistics to measure the logical replication progress
Следующее
От: vignesh C
Дата:
Сообщение: Re: [PATCH]Comment improvement in publication.sql