Re: [HACKERS] Type of bare text strings

2006-06-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > "unknown". This seems to be a cstring (i.e. length 5 considering the > trailing \0) Yeah. "unknown" used to have the same representation as "text", ie varlena, but I changed it recently because I realized that the normal thing we do with an "unknown"

Re: [HACKERS] Type of bare text strings

2006-06-08 Thread Alvaro Herrera
Alvaro Herrera wrote: > Jim C. Nasby wrote: > > What type are bare strings considered if they haven't been cast? I'm > > curious as > > to how the first case is of size 5, and how the last case is 301... > > > > decibel=# select pg_column_size('test'); > > 5 > > "unknown". This se

Re: [HACKERS] Type of bare text strings

2006-06-08 Thread Alvaro Herrera
Jim C. Nasby wrote: > What type are bare strings considered if they haven't been cast? I'm curious > as > to how the first case is of size 5, and how the last case is 301... > > decibel=# select pg_column_size('test'); > 5 "unknown". This seems to be a cstring (i.e. length 5 consi

[HACKERS] Type of bare text strings

2006-06-08 Thread Jim C. Nasby
What type are bare strings considered if they haven't been cast? I'm curious as to how the first case is of size 5, and how the last case is 301... decibel=# select pg_column_size('test'); 5 decibel=# select pg_column_size('test'::varchar); 8 decibel=# select pg_colum