Re: Surjective functional indexes

From: Christoph Berg <myon(at)debian(dot)org>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Surjective functional indexes
Date: 2017-05-30 17:01:17
Message-ID: 20170530170117.gnsd7kne6jovvpur@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Konstantin Knizhnik 2017-05-30 <f97118e3-821c-10a8-85ec-0af3f1dfd01d(at)postgrespro(dot)ru>
>
>
> On 29.05.2017 20:21, Christoph Berg wrote:
> >
> > I think the term you were looking for is "projection".
> >
> > https://en.wikipedia.org/wiki/Projection_(set_theory)
>
> I have already renamed parameter from "surjective" to "injective".
> But I am ok to do do one more renaming to "projection" if it will be
> considered as better alternative.
> From my point of view, "projection" seems to be clearer for people without
> mathematical background,
> but IMHO this term is overloaded in DBMS context.

With mathematical background, I don't see how your indexes would
exploit surjective or injective properties of the function used. What
you are using is that ->> projects a json value to one of its
components, i.e. the projection/function result does not depend on the
other attributes contained.

> The irony is that in Wikipedia "projection" is explained using
> "surjection" term:)

For the equivalence classes part, which isn't really connected to your
application.

Christoph

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-05-30 17:01:34 Re: PG10 Crash-safe and replicable Hash Indexes and UNIQUE
Previous Message Stephen Frost 2017-05-30 17:00:36 Re: [HACKERS] Channel binding support for SCRAM-SHA-256