Re: WIP: Range Types - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: WIP: Range Types
Date
Msg-id 1294517562.18031.3562.camel@jdavis
Whole thread Raw
In response to WIP: Range Types  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: WIP: Range Types  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
When writing the generic range output function, it needs to know the
specific range type in order to call the subtype's output function.

Records accomplish this by using a special cache based on the typmod,
apparently, which looks like a hack to me.

Arrays accomplish this by storing the specific type in every array
value. That seems very wasteful in the case of range types (which only
hold two values).

I thought I could get away with using get_fn_expr_argtype() for most of
the generic functions, but apparently that can't always provide an
answer.

Any ideas? Maybe, with alignment and a "flags" byte (to hold
inclusivity, infinite boundaries, etc.), the extra 4 bytes doesn't cost
much, anyway?

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: pg_upgrade fixes, #99 ;-)
Next
From: Robert Haas
Date:
Subject: Re: obj_unique_identifier(oid)