Re: Date comparison, user defined operators and magic

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Petru Ghita <petrutz(at)venaver(dot)info>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Date comparison, user defined operators and magic
Date: 2010-02-27 03:32:03
Message-ID: 11952.1267241523@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Petru Ghita <petrutz(at)venaver(dot)info> writes:
> Hello everybody, I was missing a comparison operator for DATE so I
> wrote one after a really fast look into the documentation.

Huh?

regression=# \do <
List of operators
Schema | Name | Left arg type | Right arg type | Result type | Description
------------+------+-----------------------------+-----------------------------+-------------+---------------------
...
pg_catalog | < | date | date | boolean | less-than
...

> So I started to wonder how is this possible because after doing the
> first comparison using the < operator I really wasn't expecting any of
> the other operators to work at all. But they did!

They were all there before. I doubt it was using yours even in the <
case, because pg_catalog is normally at the front of the search path.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Gould 2010-02-27 17:14:39 Issue with insert
Previous Message Petru Ghita 2010-02-27 03:08:31 Date comparison, user defined operators and magic