Re: Alignment padding bytes in arrays vs the planner

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Alignment padding bytes in arrays vs the planner
Date: 2011-04-27 03:44:27
Message-ID: BANLkTinyhECviLJ4WqUANNLBZj5D=_Mn-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 27, 2011 at 12:23 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Any ideas about better answers?
>

Here's a crazy idea. We could use string equality of the out
function's representation instead. If an output function doesn't
consistently output the same data for things that are equal or
different data for things that aren't equal then there's a bug in it
already since it means the data type won't survive a pg_dump/reload.

That alone wouldn't help since the output function could also depend
on being in a transaction but whenever we build the Const datum we
must be in a transaction, so we could store a string representation in
the Const datum and then when we need to do equal() just compare those
string representations...

I think this still performs terribly and it wastes lots of memory (and
I would assume space in rule representations?) so I think it's just a
crazy idea, but since you're asking....

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-04-27 03:47:52 Re: maximum digits for NUMERIC
Previous Message Alvaro Herrera 2011-04-27 03:38:17 Re: maximum digits for NUMERIC