From: Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
To: pgsql-interfaces@postgresql.org
Subject: Creating a new type
Date: Wed, 28 Jun 2006 11:49:56 -0300
Message-ID: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS> (raw)
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!!!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: rodrigo.sakai@zanthus.com.br
Subject: Re: Creating a new type
In-Reply-To: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox