char_length()? - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject char_length()?
Date
Msg-id 20000123124747W.t-ishii@sra.co.jp
Whole thread Raw
Responses Re: [HACKERS] char_length()?
List pgsql-hackers
char_length()/octet_length() for char() datatype returns a character
length *except* the trailing blanks. Is this what the standard
expects? Oracle's length() returns 3 in the case below.

test=> create table t2 (c char(3));
CREATE
test=> insert into t2 values('c');
INSERT 277385 1
test=> select * from t2; c  
-----c  
(1 row)

test=> select char_length(c) from t2;length 
--------     1
(1 row)

test=> select octet_length(c) from t2;octet_length 
--------------           1
(1 row)
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Refusing patches
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Happy column dropping