Re: Abbreviated keys for Numeric

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Subject: Re: Abbreviated keys for Numeric
Date: 2015-04-03 02:41:39
Message-ID: 87lhiavszn.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Robert" == Robert Haas <robertmhaas(at)gmail(dot)com> writes:

Robert> I think this is really nice work, so I have committed this
Robert> version. I made a few fairly minor changes, hopefully without
Robert> breaking anything in the process:

Robert> - I adjusted things for recent commits around INT{32,63}_{MIN_MAX}.
Robert> - I removed (void) ssup; which I do not think is normal PostgreSQL style.
Robert> - Removed the #if DEC_DIGITS != 4 check. The comment is great, but I
Robert> think we don't need protect against #if 0 code get re-enabled.

No complaints in principle for any of these

Robert> - I removed the too-clever (at least IMHO) handing of TRACE_SORT in
Robert> favor of just using #ifdef around each occurrence.

My idea here - which I have admittedly not got round to posting a patch
for yet - was that TRACE_SORT (which has been defined by default since
8.1) should be deprecated in favour of unconditional use of trace_sort.

(The actual definition of TRACE_SORT could be kept in case any extension
or whatever uses it)

Robert> - I also declared trace_sort in guc.h, where various other GUCs
Robert> are declared, instead of declaring it privately in each file
Robert> that needed it.

I was thinking miscadmin.h but whatever.

Robert> - Changed some definitions to depend on SIZEOF_DATUM rather
Robert> than USE_FLOAT8_BYVAL. Hopefully I didn't muff this; please
Robert> check it.

No, that's wrong; it must use USE_FLOAT8_BYVAL since that's what the
definitions of Int64GetDatum / DatumGetInt64 are conditional on. As you
have it now, it'll break if you build with --disable-float8-byval on a
64bit platform.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-04-03 03:56:31 Re: The return value of allocate_recordbuf()
Previous Message Abhijit Menon-Sen 2015-04-03 02:28:40 Re: What exactly is our CRC algorithm?