Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Morgan's Problem D'Jour
In article <1078976695.620522_at_yasure>, damorgan_at_x.washington.edu says...
> Yes Oracle documentation has got me again. Here's the problem.
>
> =====================================
> Oracle 9.2.0.4 on W2K SP4
>
> SQL> ALTER OPERATOR contains COMPILE;
>
> Operator altered.
> =====================================
>
> Ok so we know the operator exists and is valid
> Then we try to comment it with.
>
> =====================================
> SQL> COMMENT ON OPERATOR contains IS 'Returns 1 if True, 0 if False if a
> string or number contains a
> different string or number';
> COMMENT ON OPERATOR contains IS 'Returns 1 if True, 0 if False if a
> string or number contains a diff
> *
> ERROR at line 1:
> ORA-00966: missing TABLE keyword
> =====================================
>
> So we know the syntax listed at otn:
>
> =====================================
> "The COMMENT statement can be used to supply information about an
> indextype or operator. For example:
>
> COMMENT ON OPERATOR
> Ordsys.TextIndexType IS 'a number indicating whether the text contains
> the key';
> =====================================
>
> doesn't work.
>
> A trip to metalink only shows a single document under ORA-00966
> that has nothing to do with commenting operators.
>
> Has anyone ever done this successfully? If so ... how? Thanks.
>
>
BTW, same problem persists in 10g:
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for Linux: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
SQL> CREATE FUNCTION eq_f(a VARCHAR2, b VARCHAR2) RETURN NUMBER AS 2 BEGIN
3 IF a = b THEN RETURN 1; 4 ELSE RETURN 0; 5 END IF;
Function created.
SQL> CREATE OPERATOR eq_op
2 BINDING (VARCHAR2, VARCHAR2) 3 RETURN NUMBER 4 USING eq_f;
Operator created.
SQL> COMMENT ON OPERATOR eq_op IS
2 'Returns 1 if True, 0 if False if a string or number contains a
different string or number'
3 /
COMMENT ON OPERATOR eq_op IS
*
ERROR at line 1:
ORA-00966: missing TABLE keyword
SQL>
![]() |
![]() |