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

Поиск
Список
Период
Сортировка
От Philip Hallstrom
Тема ERROR: RemoveOperator: left unary operator '~' taking 'int2' does not ????
Дата
Msg-id Pine.BSF.4.31.0103211539080.80036-100000@oddjob.adhesivemedia.com
обсуждение исходный текст
Ответ на Re: after trigger question  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: ERROR: RemoveOperator: left unary operator '~' taking 'int2' does not ????
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: after trigger question
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: hang on (was: New Book: PostgreSQL: The Elephant Never Forgets)