Parser or documentation bug? - Mailing list pgsql-general

From Adriaan Joubert
Subject Parser or documentation bug?
Date
Msg-id 37566D0F.F6A94179@albourne.com
Whole thread Raw
List pgsql-general
Hi,

    I'm trying to define a new bit type with a length of two bytes, and to
define a set of operators on this type. I've hit the following problem:
I cannot define a | operator, as the parser doesn't like it.

tt=> drop operator | (Bit2,Bit2);
ERROR:  parser: parse error at or near "|"
tt=> create operator | (
  leftarg = Bit2,
  rightarg = Bit2,
  procedure = bit2or
);
ERROR:  parser: parse error at or near "|"

If I use || it works. So either the man page or the parser are at fault
here. I'm currently using the snapshot from last Friday. I can also do a
create by enclosing the | in double-quotes, as in "|", but I cannot use
it, and I cannot drop it.

Cheers,

Adriaan

pgsql-general by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [GENERAL] Parallelizing PostgreSQL for Cluster
Next
From: "Tim Joyce"
Date:
Subject: Re: [GENERAL] PL/pgSQL help