Re: Abbreviated keys for Numeric

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
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-04 03:24:39
Message-ID: CA+TgmoYo1KPDAkK87yOrz226Vbd8QAzTY6kXWYUXmYkDgedzHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 3, 2015 at 3:46 PM, Andrew Gierth
<andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
> (This does rather suggest to me that some better regression tests for
> sorting would be a good idea, possibly even including on-disk sorts.)

Yeah. I've been unpleasantly surprised by how easy it is to pass the
regression tests with sorting broken.

> >> If you're determined to go this route - over my protest - then you
> >> need to do something like define a NumericAbbrevGetDatum(x) macro
> >> and use it in place of the Int64GetDatum / Int32GetDatum ones for
> >> both NAN and the return from numeric_abbrev_convert_var.
>
> Robert> Patch for that attached.
>
> That looks reasonable, though I think it could do with a comment
> explaining _why_ it's defining its own macros rather than using
> Int32*/Int64*. (And I wrote that before seeing Tom's message, even.)

Agreed. I have added that and committed this.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-04-04 03:29:11 Re: Abbreviated keys for Numeric
Previous Message Robert Haas 2015-04-04 03:20:17 Re: Abbreviated keys for Numeric