2014-11-12 11 views
0

다른 변형을 시도했지만 인터넷에서이 문제를 해결할 방법을 찾지 못했습니다. 내 함수 호출은왜이 간단한 postgresql 함수 호출이 작동하지 않습니까?

select get_byte(md5('key')::text , 0); 

작동하지 않습니다.

이 글에 따르면 get_byte 문자열 입력 (http://www.postgresql.org/docs/8.0/static/functions-binarystring.html)을 기대하면서 문자열 입력을 받아 텍스트를 생성합니다.이 내용에 따르면 http://www.postgresql.org/docs/9.1/static/functions-string.htmlmd5입니다. 내가 여기서 무엇을 놓치고 있니? 오류는, byteatext을 MD5 반환 값을하지 캐스트 할 필요가 HINT: No function matches the given name and argument types. You might need to add explicit type casts.

답변

1

입니다 :

> SELECT get_byte(MD5('key')::bytea, 0); 
get_byte 
---------- 
     51 
(1 row) 
관련 문제