Re: [HACKERS] Re: attdisbursion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: attdisbursion
Date
Msg-id 29306.937580329@sss.pgh.pa.us
Whole thread Raw
In response to Re: attdisbursion  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: attdisbursiont
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Added to TODO.  This will improve VACUUM ANALYZE performance, thought I
> don't think we have btree comparison functions for all data types,
> though we should:

> * change VACUUM ANALYZE to use btree comparison functions, not <,=,> calls

There are several places that know more than they should about the
meaning of "<" etc operators.  For example, the parser assumes it
should use "<" and ">" to implement ORDER BY [DESC].  Making VACUUM
not depend on specific names for the ordering operators will not
improve life unless we fix *all* of these places.

Rather than depending on btree to tell us which way is up, maybe the
pg_type row for a type ought to specify the standard ordering operators
for the type directly.

While we are at it we could think about saying that there is just one
"standard ordering operator" for a type and it yields a strcmp-like
result (minus, zero, plus) rather than several ops yielding booleans.
But that'd take a lot of changes in btree and everywhere else...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Join syntax
Next
From: Brook Milligan
Date:
Subject: Re: [HACKERS] pgaccess seems a tad confused