X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 09D1AD1B16B for ; Wed, 19 May 2004 14:07:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 08757-06 for ; Wed, 19 May 2004 14:07:28 -0300 (ADT) Received: from p15124592.pureserver.info (p15124592.pureserver.info [217.160.181.164]) by svr1.postgresql.org (Postfix) with ESMTP id 18543D1B188 for ; Wed, 19 May 2004 14:07:27 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by p15124592.pureserver.info (Postfix) with ESMTP id 4448317981 for ; Wed, 19 May 2004 19:07:26 +0200 (CEST) Received: from sarge (p508A8EF0.dip0.t-ipconnect.de [80.138.142.240]) by p15124592.pureserver.info (Postfix) with ESMTP id 5E9801796E for ; Wed, 19 May 2004 19:07:25 +0200 (CEST) Received: from mk-os.de (unknown [192.168.0.210]) by sarge (Postfix) with ESMTP id 1F0503EC05 for ; Wed, 19 May 2004 19:07:24 +0200 (CEST) Message-ID: <40AB94CF.90802@mk-os.de> Date: Wed, 19 May 2004 19:09:35 +0200 From: Martin Knipper User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Function valid only for one table References: <40AB7272.2090605@mk-os.de> <40AB8C4C.8080602@archonet.com> In-Reply-To: <40AB8C4C.8080602@archonet.com> X-Enigmail-Version: 0.83.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS at MK-OS X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/168 X-Sequence-Number: 17882 Am 19.05.2004 18:33 schrieb Richard Huxton: > Martin Knipper wrote: > >>Hi there, >> >>is it possible to define a function that is only valid in a context >>of one table ? >> >>For Example: >> >>select someFunction() from someTable; >>-> OK >> >>select someFunction() from anotherTable; >>-> Error: someFunction unkown > > > Um, no. What do you want someFunction() to do? > I thought about a mixture of object orientation and a normal table for a relational database. someFunction() is a method for the object/table someTable. Since AFAIK postgres doesn't support calling methods of types or objects I thought about a workaround. That's why is ask the above question. By the way, does anyone know if there is something like a standard for object relational databases ? An URL would be nice. Thanks and Greetings, Martin