Re: Declarative partitioning grammar

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Cohen <jcohen(at)greenplum(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Mike <ipso(at)snappymail(dot)ca>, Gavin Sherry <swm(at)alcove(dot)com(dot)au>
Subject: Re: Declarative partitioning grammar
Date: 2008-01-15 03:45:28
Message-ID: 12127.1200368728@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Cohen <jcohen(at)greenplum(dot)com> writes:
> In the proposed solution, hash and list partitions work for all types
> that support an equality operator, and range partitions work for all
> types that support fully-ordered comparison.

Surely a hashing method would require a *hashable* equality operator,
ie a hash opclass; likewise range partitions would demand a matching
btree opclass. You could do list partitions with an equality operator
of either kind.

Essentially all of the system's current knowledge about the properties
of specific operators is encoded as operator classes for one of these
two built-in index types. If you want to make assumptions about the
behavior of an operator, it really needs to be founded on these types of
opclasses --- or else you're buying into inventing a comparable amount
of infrastructure for some other organizational concept.

I think Peter's point was that you might want to think about
generalizing your concepts so that other kinds of operator classes could
someday serve as the foundations for other kinds of partitioning rules.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-01-15 03:47:55 Re: [COMMITTERS] pgsql: Most recent Postgres version is 8.2.6, per report from Robert
Previous Message Tom Lane 2008-01-15 03:33:28 Re: SSL over Unix-domain sockets