# 일부 태그 사용 시 내부 서버 오류 발생 (오류: 고유 제약 조건 'index\_tags\_on\_name'을(를) 위반하는 중복 키 값)

**URL:** https://meta.discourse.org/t/internal-server-error-on-using-some-tags-error-duplicate-key-value-violates-unique-constraint-index-tags-on-name/131266
**Category:** Bug
**Created:** [10월 17, 2019, 3:29오후 UTC](https://meta.discourse.org/t/internal-server-error-on-using-some-tags-error-duplicate-key-value-violates-unique-constraint-index-tags-on-name/131266 "2019-10-17T15:29:57Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [11월 8, 2019, 2:16오전 UTC](https://meta.discourse.org/t/internal-server-error-on-using-some-tags-error-duplicate-key-value-violates-unique-constraint-index-tags-on-name/131266/15 "2019-11-08T02:16:58Z")

</div>

잘 해결했습니다 😃

다른 분들도 중복된 태그를 찾는 쿼리가 필요하신 분들을 위해 공유합니다:

```sql
SELECT name, COUNT(*)
FROM tags
GROUP BY name
HAVING COUNT(*) > 1

```

> [@neil](#):
>
> 태이블에만 이 문제가 있기를 바라지만…

지금 와서 놀라게 하지 마세요, Neil! 😱

카테고리 테이블도 간단히 확인해 봤는데 문제없어 보입니다 (이름 기준으로 중복된 항목이 몇 개 있긴 하지만, 그것들은 하위 카테고리입니다).

도와주셔서 감사합니다 @sam, @neil 😊

_(Neil, 재인덱싱은 [이](https://meta.discourse.org/t/tag-not-showing-in-search-results-when-exact-search-query/132550/3) 문제에는 효과가 없었네요)_

---

_[View the full topic](https://meta.discourse.org/t/internal-server-error-on-using-some-tags-error-duplicate-key-value-violates-unique-constraint-index-tags-on-name/131266)._
