Re: WIP: Range Types

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Range Types
Date: 2011-01-08 20:12:42
Message-ID: 1294517562.18031.3562.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-08 20:44:09 Re: obj_unique_identifier(oid)
Previous Message Bruce Momjian 2011-01-08 18:53:15 pg_upgrade fixes, #99 ;-)