Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BD166633570; Mon, 20 Apr 2009 09:19:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 11213-01-3; Mon, 20 Apr 2009 09:19:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mail.postgresql.org (Postfix) with ESMTP id 99F83634C72; Mon, 20 Apr 2009 09:05:24 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so1455008ywj.73 for ; Mon, 20 Apr 2009 05:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=dTRWGDtjny+v/UGtPfGKIgJG8za/3mtn4xgadm8ovzM=; b=lqgVn5IuVFDd3lFYhHwZXcw1RBgrEfq0WkclOIAwtVyDHbMKTatwQczIgIhqR6B0tL wjDIQfkYDbn8tJ5fVWAbcz7QfUlFfCeh2mfdjLua39shjSVb6AzCaWcX4XazCCaxB/m5 8KjDi23tZTt81HX3XgIhV8E99wNYjFbYD3Q1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=dCV9nMYyUlK1oHQMiGu1RDfZsOYyUfhdBl1tJfwqo25laR3RFstNsmF3oLgvr0xTCX 9Jii3zUEBaFUsf+xBs8VJ75XzXrsTHpFLMa7Cxd0AVZngQVJIIhVLol/MQ8NsDUIu+Us Cums3j3HB6zeje3iwFzuTNbGvQcI87LML/Ox0= MIME-Version: 1.0 Received: by 10.231.20.2 with SMTP id d2mr3263421ibb.27.1240229123053; Mon, 20 Apr 2009 05:05:23 -0700 (PDT) Date: Mon, 20 Apr 2009 09:05:22 -0300 Message-ID: <41534c40904200505j356ae308jb5528daeeb27a004@mail.gmail.com> Subject: Does Postgresql 8.3X support Object/Class Methods and association between objects with REF? From: Robson Fidalgo To: pgsql-docs@postgresql.org, pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary=00032557467a51d93a0467fb58dc X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/43 X-Sequence-Number: 5131 --00032557467a51d93a0467fb58dc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 find documentation/examples about the usage of Object/Class Methods and association between objects with REF (like oracle does). Then, I'd like to 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 features. 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) in oracle. Then, how can I do a similar example in Postgresql 8.3X? (Just a code example help me! You don't need explain the example.) Thanks in advances, Robson. CREATE TYPE tp_father AS OBJECT ( name varchar2(60)); CREATE OR REPLACE TYPE BODY tp_father AS MEMBER FUNCTION get_name RETURN varchar2 IS BEGIN RETURN name; END; END; CREATE TYPE tp_son AS OBJECT ( name varchar2(60), father REF tp_father); CREATE TABLE father OF tp_father; CREATE TABLE son OF tp_son; --00032557467a51d93a0467fb58dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

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 find documentation/examples about the usage of Object/Class Meth= ods and association between objects with REF (like oracle does). Then, I= 9;d like to know if theses concepts (Method and REF) are supported by postg= resql 8.3X? I've searched the mailing lists and have found little about= the OR features. There is some book or URL with a good material about post= gres 8.3 OR features? Below follows an example (Son has a REF for his Fathe= r and a get_name method)=A0in oracle. Then, how can I do a similar example = in Postgresql 8.3X?=A0(Just a code example help me! You don't need expl= ain the example.)

Thanks in advances,

Robson.

CREATE TYPE tp_father AS OBJECT (
=A0name varchar2(60));

CREATE OR REPLACE TYPE BODY tp_father AS
=A0 MEMBER FUNCTION get_name= RETURN varchar2 IS
=A0=A0=A0=A0 BEGIN
=A0=A0=A0=A0=A0=A0=A0 RETURN n= ame;
=A0=A0=A0=A0 END;
END;

CREATE TYPE tp_son AS OBJECT (
=A0 name varchar2(60),
=A0 father = REF tp_father);

CREATE TABLE father OF tp_father;
CREATE TABLE son OF tp_son;

--00032557467a51d93a0467fb58dc--