1
아주 짧은 질문. 이 쿼리PostgreSQL. 연결의 이상한 행동
select LENGTH(' '::char || ' '::char), LENGTH(' '::text || ' '::char), LENGTH(' ' || ' '), LENGTH('a'::char || 'b'::char);
반환
0 1 2 2
가 특수 문자 마녀가 다른 문자열을 연결하여하지 않는 공간이 왜 사람이 말을 할 수 있습니까?
문서는 말한다에만이 :
Unless otherwise noted, all of the functions listed below work
on all of these types, but be wary of potential effects of
automatic space-padding when using the character type.
난 할 이유는 무엇입니까? 왜냐하면 난 저장 프로 시저에서 문자 숯불에 의해 건물이고, 내가 아무것도 char varchar 연결하려고 할 때.
그래서 char (1)에서 varchar (1)로 currient char가 들어있는 변수를 변경했습니다. everythign은 문제가되지 않습니다. 감사. – Yavanosta