Sigh, another contrib/cube and contrib/seg problem

Started by Tom Laneover 20 years ago6 messages
#1Tom Lane
tgl@sss.pgh.pa.us

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

#2Marc G. Fournier
scrappy@postgresql.org
In reply to: Tom Lane (#1)
Re: Sigh, another contrib/cube and contrib/seg problem

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@hub.org Yahoo!: yscrappy ICQ: 7615664

#3Robert Treat
xzilla@users.sourceforge.net
In reply to: Tom Lane (#1)
Re: Sigh, another contrib/cube and contrib/seg problem

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

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Robert Treat (#3)
Re: Sigh, another contrib/cube and contrib/seg problem

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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Andrew - Supernews
andrew+nonews@supernews.com
In reply to: Tom Lane (#1)
Re: Sigh, another contrib/cube and contrib/seg problem

On 2005-06-27, Tom Lane <tgl@sss.pgh.pa.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

#6Josh Berkus
josh@agliodbs.com
In reply to: Andrew - Supernews (#5)
Re: Sigh, another contrib/cube and contrib/seg problem

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