Re: Garbage pad bytes within datums are bad news

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Garbage pad bytes within datums are bad news
Date: 2008-04-04 21:53:41
Message-ID: 47F6A365.7050006@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> That still puts the responsibility on the individual datatype author to
> get it right. The case I'm most worried about is user-written datatypes
> that are never going to magically acquire such asserts.

It seems to me that working with two assumption (binary equal and
catalog-defined equal function) in the same time is a wrong way. If we decide to
use binary equal criteria, then why we need catalog-defined equal at all? If we
use catalog-defined one, why we should require binary equality? Using both way
in the same time is an error prone. It's possible to say that two value is equal
if they are binary the same, if not - we should find catalog-defined equal
operation and call it. Binary comparison is only an optimization.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dawid Kuroczko 2008-04-04 22:15:29 Re: psql \G command -- send query and output using extended format
Previous Message Tom Lane 2008-04-04 21:25:15 Re: Garbage pad bytes within datums are bad news