Re: Alignment padding bytes in arrays vs the planner - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Alignment padding bytes in arrays vs the planner
Date
Msg-id BANLkTinyhECviLJ4WqUANNLBZj5D=_Mn-w@mail.gmail.com
Whole thread Raw
In response to Alignment padding bytes in arrays vs the planner  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Alignment padding bytes in arrays vs the planner  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 27, 2011 at 12:23 AM, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: maximum digits for NUMERIC
Next
From: Bruce Momjian
Date:
Subject: Re: maximum digits for NUMERIC