Re: Date comparison, user defined operators and magic - Mailing list pgsql-sql

From Tom Lane
Subject Re: Date comparison, user defined operators and magic
Date
Msg-id 11952.1267241523@sss.pgh.pa.us
Whole thread Raw
In response to Date comparison, user defined operators and magic  (Petru Ghita <petrutz@venaver.info>)
List pgsql-sql
Petru Ghita <petrutz@venaver.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


pgsql-sql by date:

Previous
From: Petru Ghita
Date:
Subject: Date comparison, user defined operators and magic
Next
From: Michael Gould
Date:
Subject: Issue with insert