참고 사이트 https://www.postgresql.org/docs/current/sql-createtrigger.html 얼마 전에 특정 table에 대한 변경 이력을 저장해야 하는 작업을 진행하면서 trigger를 처음 사용하 보았다. (A table에서 발생하는 insert, update row를 B table에 추가) 적용해야 하는 조건이 간단해서 trigger 적용도 간단하게 할 수 있었다. trigger 생성은 다음과 같이 선언한다. create trigger save_history after insert or update on A for each row execute procedure trigger_upsert_data(); - trigger 이름은 save_history로 선언 - ins..
wono
|
Do you want to delete?