Received: from sapphire.albourne.com (root@sapphire.albourne.com [195.212.241.227]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA81908 for ; Thu, 23 Sep 1999 03:45:18 -0400 (EDT) (envelope-from a.joubert@albourne.com) Received: from isadora.cy.albourne.com (akamas.albourne.com [195.212.241.254]) by sapphire.albourne.com (8.9.3/8.9.3/Albourne/CYS/1.6X) with ESMTP id KAA16890; Thu, 23 Sep 1999 10:47:43 +0300 (EET DST) Received: from albourne.com (localhost [127.0.0.1]) by isadora.cy.albourne.com (8.9.3/8.9.3/Albourne/CYC/1.4) with ESMTP id KAA31671; Thu, 23 Sep 1999 10:45:09 +0300 (EET DST) Sender: a.joubert@albourne.com Message-ID: <37E9DA85.F0210261@albourne.com> Date: Thu, 23 Sep 1999 10:45:09 +0300 From: Adriaan Joubert Organization: APL Financial Services (Overseas) Ltd X-Mailer: Mozilla 4.61 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: Postgresql , Thomas Lockhart Subject: Re: [HACKERS] Operator definitions References: <2198.938033780@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------827046437B2B894D41A4E11C" This is a multi-part message in MIME format. --------------827046437B2B894D41A4E11C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > It looks to me like '^' and '|' have been left out of the alternatives > for MathOp in src/backend/parser/gram.y. It could be they were > deliberately omitted, but I bet it's just an oversight. OK, here is a patch to allow both ^ and | as operators, both in operator definitions and expressions. It seems to work for me. Unfortunately the regression tests do not tell me an awful lot, as several of them fail on the Alpha anyway. As I don;t really know what I'm doing, I'd appreciate it if somebody else could check the patch out and let me know whether it is ok. Cheers, Adriaan --------------827046437B2B894D41A4E11C Content-Type: text/plain; charset=us-ascii; name="pgram" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pgram" *** src/backend/parser/gram.y Thu Sep 23 10:36:47 1999 --- src/backend/parser/gram.y.orig Tue Sep 14 09:07:35 1999 *************** *** 2021,2028 **** | '*' { $$ = "*"; } | '/' { $$ = "/"; } | '%' { $$ = "%"; } - | '^' { $$ = "^"; } - | '|' { $$ = "|"; } | '<' { $$ = "<"; } | '>' { $$ = ">"; } | '=' { $$ = "="; } --- 2021,2026 ---- *************** *** 3666,3673 **** { $$ = makeA_Expr(OP, "*", $1, $3); } | a_expr '^' a_expr { $$ = makeA_Expr(OP, "^", $1, $3); } - | a_expr '|' a_expr - { $$ = makeA_Expr(OP, "|", $1, $3); } | a_expr '<' a_expr { $$ = makeA_Expr(OP, "<", $1, $3); } | a_expr '>' a_expr --- 3664,3669 ---- --------------827046437B2B894D41A4E11C--