[PostgreSQL] ON CONFLICT ERROR (there is no unique or ~)
·
Develop/Database
상황ON CONFLICT ~ DO UPDATE ~ 수행 시 다음과 같은 에러 출력더보기there is no unique or exclusion constraint matching the ON CONFLICT specification원인Primary Key, Unique Key가 정의 되어 있지 않아 발생해결Unique Key 추가ALTER TABLE [MY_TABLE]ADD CONSTRAINT unique_datetime_tag_name UNIQUE (datetime, tag_name);
욱근욱