Bug in CREATE OPERATOR

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Bug in CREATE OPERATOR
Дата
Msg-id NEBBIOAJBMEENKACLNPCIELICCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы RE: Bug in CREATE OPERATOR  ("Darren King" <darrenk@insightdist.com>)
Re: Bug in CREATE OPERATOR  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
As part of our development, one of our programmers created a new database
type, plus operators and functions to go with it.  One of the things he did
was this:

CREATE OPERATOR testbit (   leftarg = bitset,   rightarg = int4,   procedure = testbit,   commutator = testbit
);

Notice that this is an ILLEGAL type - the name of the type (from docs) must
only contain these characters:

+ - * / < > = ~ ! @ # % ^ & | ` ? $

However, PostgreSQL 7.0.3 went right ahead and created the operator anyway!!

Now we have a big problem, as the DROP OPERATOR command cannot delete the
illegally named operator.

eg:

usa=# drop operator testbit (bitset, int4);
ERROR:  parser: parse error at or near "testbit "
usa=# drop operator 'testbit ' (bitset, int4);
ERROR:  parser: parse error at or near "'"
usa=# drop operator "testbit " (bitset, int4);
ERROR:  parser: parse error at or near """

We can't delete it!!!  I also assume that it was a bug that it could even be
created in the first place...

Chris

--
Christopher Kings-Lynne
Family Health Network (ACN 089 639 243)



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

Предыдущее
От: Karel Zak
Дата:
Сообщение: PL/Python (was: Re: [GENERAL] Re: Trigger)
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: sequence numbering on mails