Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> cannot call member function on object type

cannot call member function on object type

From: Peter Mutsaers <plm_at_gmx.li>
Date: 26 Mar 2002 12:01:36 +0100
Message-ID: <87r8m74mpb.fsf@muon.mutsaers.com>


On 8.1.6 I cannot call a member function from SQL in the way described in the manual.

The following example is almost copied from the manual:

create or replace TYPE foo AS OBJECT (a1 NUMBER,

                  MEMBER FUNCTION getbar RETURN NUMBER);
create or replace type body foo is
  MEMBER FUNCTION getbar RETURN NUMBER is   begin
    return 45;
  end;
end;

CREATE TABLE footab(col foo);

SELECT col,foo.getbar(col) FROM footab; -- OK select col,col.getbar() from footab; -- ERROR

The second select is the way it should be, but I get an error "invalid column name".

Using the first select, I get the result. This is strange because this is more or less the 'static member' notation (filling in the implicit self parameter myself).

Is this a known bug in 8.1.6, maybe fixed in later versions?

-- 
Peter Mutsaers  |  Dübendorf    | UNIX - Live free or die
plm_at_gmx.li      |  Switzerland  | Sent via FreeBSD 4.4-stable
Received on Tue Mar 26 2002 - 05:01:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US