X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 867B09FA5C9 for ; Wed, 28 Jun 2006 11:59:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 81611-02 for ; Wed, 28 Jun 2006 11:59:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CD40F9FA5CD for ; Wed, 28 Jun 2006 11:59:47 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5SExk9x015257; Wed, 28 Jun 2006 10:59:46 -0400 (EDT) To: rodrigo.sakai@zanthus.com.br cc: pgsql-interfaces@postgresql.org Subject: Re: Creating a new type In-reply-to: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS> References: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS> Comments: In-reply-to "Rodrigo Sakai" message dated "Wed, 28 Jun 2006 11:49:56 -0300" Date: Wed, 28 Jun 2006 10:59:45 -0400 Message-ID: <15256.1151506785@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/40 X-Sequence-Number: 6181 "Rodrigo Sakai" writes: > So, when I execute an INSERT operation on this table, the functions that > deals with this type need the id or name of the table that the data was > inserted! Why? Your example datatype doesn't seem to require any such thing. > How can I get this ID or NAME inside this functions??? You can't. The question itself is bogus because it assumes that data values only exist within tables. You could not have a transient value of the datatype (eg, a function result) because that is not stored in any table. regards, tom lane