ERROR: RemoveOperator: left unary operator '~' taking 'int2' does not ????

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: ERROR: RemoveOperator: left unary operator '~' taking 'int2' does not ????
Date: 2001-03-21 23:41:20
Message-ID: Pine.BSF.4.31.0103211539080.80036-100000@oddjob.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi -
I'm playing around with C functions, etc... and am running into a
strange problem where I cannot delete the operator once I've created it.
I can succesfully create/drop operators with two operands, just not this
one.

Here's a transcript. What am I missing? This is happening with 7.0.3.

Thanks!

template1=# \c test
You are now connected to database test.
test=# CREATE FUNCTION am_int_bit_not(int2) RETURNS int2
test-# AS '/local/www/sites/odin/sql/int_bit_operators/am_int_bit_operators.so', 'am_int_bit_not'
test-# LANGUAGE 'C';
CREATE
test=# CREATE OPERATOR ~ (
test(# RIGHTARG = INT2,
test(# PROCEDURE = am_int_bit_not
test(# );
CREATE
test=# \do ~
List of operators
Op | Left arg | Right arg | Result | Description
----+----------+-----------+--------+--------------------------------
~ | | int2 | int2 |
~ | _aclitem | aclitem | bool | matches regex., case-sensitive
~ | bit | bit | bit | bitwise negation
~ | box | box | bool | contains
~ | bpchar | text | bool | matches regex., case-sensitive
~ | circle | circle | bool | contains
~ | circle | point | bool | circle contains point?
~ | name | text | bool | matches regex., case-sensitive
~ | path | point | bool | path contains point?
~ | polygon | point | bool | polygon contains point?
~ | polygon | polygon | bool | contains
~ | text | text | bool | matches regex., case-sensitive
~ | varbit | varbit | varbit | bitwise negation
~ | varchar | text | bool | matches regex., case-sensitive
(14 rows)

test=# select ~ 2::int2;
?column?
----------
-3
(1 row)

test=# DROP OPERATOR ~ (NONE, INT2);
ERROR: RemoveOperator: left unary operator '~' taking 'int2' does not exist
test=# DROP OPERATOR ~ (INT2, NONE);
ERROR: RemoveOperator: right unary operator '~' taking 'int2' does not exist

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vince Vielhaber 2001-03-21 23:42:05 Re: hang on (was: New Book: PostgreSQL: The Elephant Never Forgets)
Previous Message Stephan Szabo 2001-03-21 23:28:23 Re: after trigger question