내 Postgres
db에 uuid
을 쿼리하려고합니다.Postgres에서 특정 uuid를 어떻게 쿼리합니까?
ERROR: invalid input syntax for uuid: "e0da8698-32e6-11e7-a8de-985aeb8b64f"
: 나는
select * from casefile where casefile_id = 'e0da8698-32e6-11e7-a8de-985aeb8b64f';
와 쿼리 및 오류를 얻으려고
Column | Type | Modifiers
----------------------+-----------------+-------------------------------------
casefile_id | uuid | not null default uuid_generate_v1()
org_id | uuid |
casefile_template_id | uuid |
casefile_status | casefile_status |
: 여기 내 테이블 스키마입니다 :
select * from casefile where casefile_id = ANY('{e0da8698-32e6-11e7-a8de-985aeb8b64f}');
하지만 여전히 오류 얻을 :
ERROR: invalid input syntax for uuid: "e0da8698-32e6-11e7-a8de-985aeb8b64f"
내가 무엇을 놓치고를? UUID
로 필터링하려면 어떻게해야합니까? 다른 기본 키처럼 쿼리 할 수없는 이유는 무엇입니까?
어떤 버전의 Postgres를 사용하고 있습니까? –
이 테이블을 어떻게 채웠습니까? –
9.5.2. 필자는 테이블에 'express'엔드 포인트를 채웠습니다. uuid는이 데이터 유형으로 'UUID PRIMARY KEY DEFAULT uuid_generate_v1()'테이블에 작성되었습니다. – jhamm