- 论坛徽章:
- 0
|
我有个域名记录表- \d records
- Table "public.records"
- Column | Type | Modifiers
- -------------+------------------------+------------------------------------------------------
- id | integer | not null default nextval('records_id_seq'::regclass)
- name | character varying(64) |
- ttl | integer |
- type | character varying(8) |
- content | character varying(255) |
- owner_email | character varying(64) |
复制代码 我怎么建立一个视图,然后把INSERT UPDATE DELETE 的操作记录到另外一个表
我需要监控到 ttl,type,content三个值的变化,有变化就记录到类似表- \d changlog
- Table "public.changlog"
- Column | Type | Modifiers
- -------------+-----------------------------+-------------------------------------------------------
- id | integer | not null default nextval('changlog_id_seq'::regclass)
- action | character varying(8) |
- name | character varying(64) |
- record | text |
- owner_email | character varying(64) |
- memo | text |
- chang_date | timestamp without time zone | default now()
复制代码 action 就是 执行的INSERT UPDATE DELETE的操作吧
changlog表的record值的信息相对于record表里的 ttl+type+content 值
求助,大侠有空帮忙看看 |
|