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 7E2459F9DCC for ; Wed, 28 Jun 2006 11:49:51 -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 79735-04 for ; Wed, 28 Jun 2006 11:49:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.zanthus.com.br (mail.zanthus.com.br [200.212.65.85]) by postgresql.org (Postfix) with ESMTP id 5B4F29FA5C9 for ; Wed, 28 Jun 2006 11:49:40 -0300 (ADT) Received: from cprsakai ([192.168.0.71]) by mail.zanthus.com.br (8.13.4/8.13.4/Debian-3) with ESMTP id k5SErOcC028724 for ; Wed, 28 Jun 2006 11:53:24 -0300 Reply-To: From: "Rodrigo Sakai" To: Subject: Creating a new type Date: Wed, 28 Jun 2006 11:49:56 -0300 Message-ID: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002B_01C69AA8.F9DD4910" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Thread-Index: Acaawh7bTVO9uzbcTAuFqvzZIq9KNw== X-Zanthus-MailScanner: Found to be clean X-Zanthus-MailScanner-From: rodrigo.sakai@zanthus.com.br X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/39 X-Sequence-Number: 6180 This is a multi-part message in MIME format. ------=_NextPart_000_002B_01C69AA8.F9DD4910 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all, I have to create a new composed data type to use in almost all tables of my database. Something like: CREATE TYPE time_interval ( Tbegin date, Tend date ) And when use this new type in my tables! So, I have to be able to get the table_name or table_id that the type is in. For exemple: CREATE TABLE employee ( Emp_id int, Emp_name varchar(30), Emp_time time_interval ) 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! How can I get this ID or NAME inside this functions??? Thanks!!! ------=_NextPart_000_002B_01C69AA8.F9DD4910 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

  Hi all,

 

  I have to create a new composed data = type to use in almost all tables of my database. Something = like:

 

  CREATE TYPE time_interval = (

    Tbegin = date,

    Tend = date

   )

 

 

  And when use this new type in my = tables! So, I have to be able to get the table_name or table_id that the type is in. = For exemple:

 

  CREATE TABLE employee = (

    Emp_id = int,

    Emp_name = varchar(30),

    Emp_time = time_interval

  )

 

  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!

  How can I get this ID or NAME inside this = functions???

 

  Thanks!!!

 

 

------=_NextPart_000_002B_01C69AA8.F9DD4910--