Re: PostgreSQL for VAX on NetBSD/OpenBSD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, John Klos <john(at)ziaspace(dot)com>
Subject: Re: PostgreSQL for VAX on NetBSD/OpenBSD
Date: 2015-08-23 17:17:52
Message-ID: 14369.1440350272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I think we should replace the whole mess with, say, uint32 for float and
> UINT_MAX for infinity. That will be more portable, probably faster, and
> it will work correctly up to substantially *larger* peak distances than
> the existing code.

After studying the logic a bit more, I realized that the "finite"
distances computed by the algorithm can actually never exceed u_size,
which we're already constraining to be less than SHRT_MAX so that the
adjacency arrays can be "short". So I made it use "short" storage for
distances too, with SHRT_MAX as the infinity value. If we ever find a
need to work with graphs exceeding 32K nodes, it will be trivial to
s/short/int/g in this code.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-23 17:28:10 Re: PostgreSQL for VAX on NetBSD/OpenBSD
Previous Message Kevin Grittner 2015-08-23 16:46:46 Re: minor typo in trigger.c