Sigh, another contrib/cube and contrib/seg problem

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 01:23:42
Message-ID: 20653.1119835422@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I just noticed that these two modules define operator @ as "contains"
and operator ~ as "contained by", which is opposite to the meanings used
by every other datatype.

Is it better to fix this or leave well enough alone?

regards, tom lane


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 02:00:27
Message-ID: 20050626225923.X57847@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sun, 26 Jun 2005, Tom Lane wrote:

> I just noticed that these two modules define operator @ as "contains"
> and operator ~ as "contained by", which is opposite to the meanings used
> by every other datatype.
>
> Is it better to fix this or leave well enough alone?

I'd say for consistencies sake, it should be fixed, but that will break
'backwards compatibility' for anyone using it ... :(

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 02:04:00
Message-ID: 200506262204.00575.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sunday 26 June 2005 21:23, Tom Lane wrote:
> I just noticed that these two modules define operator @ as "contains"
> and operator ~ as "contained by", which is opposite to the meanings used
> by every other datatype.
>
> Is it better to fix this or leave well enough alone?
>

ISTM it will have to be fixed eventually.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 02:15:58
Message-ID: 200506270215.j5R2Fwq23189@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Treat wrote:
> On Sunday 26 June 2005 21:23, Tom Lane wrote:
> > I just noticed that these two modules define operator @ as "contains"
> > and operator ~ as "contained by", which is opposite to the meanings used
> > by every other datatype.
> >
> > Is it better to fix this or leave well enough alone?
> >
>
> ISTM it will have to be fixed eventually.

We will mention the fix in the release notes if the commit message
mentions it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 07:16:52
Message-ID: slrndbv9v4.192v.andrew+nonews@trinity.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2005-06-27, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I just noticed that these two modules define operator @ as "contains"
> and operator ~ as "contained by", which is opposite to the meanings used
> by every other datatype.

These operators are fundamentally confusing because they give no visual
indication as to which operand is the "larger" one.

I'd consider replacing them with something clearer, perhaps @< and @> ?
(i.e. (a @< b) would mean "a is contained by b" and (a @> b) would mean
"a contains b")

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sigh, another contrib/cube and contrib/seg problem
Date: 2005-06-27 16:58:30
Message-ID: 200506270958.31029.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew,

> I'd consider replacing them with something clearer, perhaps @< and @> ?
> (i.e. (a @< b) would mean "a is contained by b" and (a @> b) would mean
> "a contains b")

Ltree uses those operators in that way, I believe.

--
Josh Berkus
Aglio Database Solutions
San Francisco