Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D6F4B633F31; Mon, 20 Apr 2009 09:33:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70415-02-8; Mon, 20 Apr 2009 09:33:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f220.google.com (mail-gx0-f220.google.com [209.85.217.220]) by mail.postgresql.org (Postfix) with ESMTP id 748886326EB; Mon, 20 Apr 2009 09:28:34 -0300 (ADT) Received: by gxk20 with SMTP id 20so4815851gxk.19 for ; Mon, 20 Apr 2009 05:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=l73N21tFYwWQrJtead5tNnP3+v5KN+n0Oqpeh9jFFvg=; b=a7Kis/6g2G2QferwRPcmm/XmdyhUyvj8hFxs1BirHt7Acb/cJCdI/2pWPPRrlRApam w+Q+F8YNbEdkpeSdhR8FVp57uWbiR77s5s/qqVnBwQnJQcfQ3yFu2fsGYfACuDPJ3po7 HMElBQvSy1fDzFgaIX1NSM0YN3g1NTR+b+aNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=w1XUophlGxQCfXrn6r8icRaY2slCi+yfKBKQI+2B8CD//z0lCROkl0tXpMFDdW0RLD NJ4nvLr1U61gXLSwi+gQQk3iP/uLgnuHR98980MRFWISiyrJSKp/S+aaBenhhmUWZ1C/ sSQTpro0gLgIIiy51oP4br97Hwa0UuTHPflVs= MIME-Version: 1.0 Received: by 10.150.211.4 with SMTP id j4mr6277409ybg.237.1240230513148; Mon, 20 Apr 2009 05:28:33 -0700 (PDT) In-Reply-To: <41534c40904200505j356ae308jb5528daeeb27a004@mail.gmail.com> References: <41534c40904200505j356ae308jb5528daeeb27a004@mail.gmail.com> Date: Mon, 20 Apr 2009 14:28:33 +0200 Message-ID: <162867790904200528p2c83fcc2p982156d90a5f65ca@mail.gmail.com> Subject: Re: Does Postgresql 8.3X support Object/Class Methods and association between objects with REF? From: Pavel Stehule To: Robson Fidalgo Cc: pgsql-docs@postgresql.org, pgsql-general@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/775 X-Sequence-Number: 146731 2009/4/20 Robson Fidalgo : > Hello, > I am study the relational-object paradigm with postgresql 8.3X and I know > that it supports composite and/or array attributes. However, I didn't fin= d > documentation/examples about the usage of Object/Class Methods and > association between objects with REF (like oracle does). Then, I'd like t= o > know if theses concepts (Method and REF) are supported by postgresql 8.3X= ? > I've searched the mailing lists and have found little about the OR featur= es. > There is some book or URL with a good material about postgres 8.3 OR > features? Below follows an example (Son has a REF for his Father and a > get_name method)=C2=A0in oracle. Then, how can I do a similar example in > Postgresql 8.3X?=C2=A0(Just a code example help me! You don't need explai= n the > example.) > > Thanks in advances, Hello this feature isn't supported regards Pavel Stehule > > Robson. > > CREATE TYPE tp_father AS OBJECT ( > =C2=A0name varchar2(60)); > > CREATE OR REPLACE TYPE BODY tp_father AS > =C2=A0 MEMBER FUNCTION get_name RETURN varchar2 IS > =C2=A0=C2=A0=C2=A0=C2=A0 BEGIN > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RETURN name; > =C2=A0=C2=A0=C2=A0=C2=A0 END; > END; > > CREATE TYPE tp_son AS OBJECT ( > =C2=A0 name varchar2(60), > =C2=A0 father REF tp_father); > > CREATE TABLE father OF tp_father; > CREATE TABLE son OF tp_son;