| От | Rodrigo Sakai |
|---|---|
| Тема | Creating a new type |
| Дата | |
| Msg-id | 002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS обсуждение исходный текст |
| Ответы |
Re: Creating a new type
|
| Список | pgsql-interfaces |
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!!!
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера