Type of bare text strings

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Type of bare text strings
Дата
Msg-id 20060608155032.GO45331@pervasive.com
обсуждение исходный текст
Ответы Re: Type of bare text strings  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
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_column_size('test'::text);             8

decibel=# select pg_column_size('test'::name);            64

decibel=# select pg_column_size('test'::char(4));             8

decibel=# select
pg_column_size('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890');
         301
 

decibel=# 
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ADD/DROP INHERITS
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: More on inheritance and foreign keys