Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5CED3637940 for ; Fri, 26 Feb 2010 23:45:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 54365-01-2 for ; Sat, 27 Feb 2010 03:44:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id ADAF76385DE for ; Fri, 26 Feb 2010 23:32:05 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o1R3W30h011953; Fri, 26 Feb 2010 22:32:03 -0500 (EST) To: Petru Ghita cc: pgsql-sql@postgresql.org Subject: Re: Date comparison, user defined operators and magic In-reply-to: <4B888CAF.6030101@venaver.info> References: <4B888CAF.6030101@venaver.info> Comments: In-reply-to Petru Ghita message dated "Sat, 27 Feb 2010 04:08:31 +0100" Date: Fri, 26 Feb 2010 22:32:03 -0500 Message-ID: <11952.1267241523@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.462 tagged_above=-10 required=5 tests=AWL=0.137, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/103 X-Sequence-Number: 33702 Petru Ghita 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