| От | Alvaro Herrera |
|---|---|
| Тема | Re: Type of bare text strings |
| Дата | |
| Msg-id | 20060608161439.GC17421@surnet.cl обсуждение |
| Ответ на | Re: Type of bare text strings (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-hackers |
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 seems to be a cstring (i.e. length 5 considering the
> trailing \0)
Yup. This is handled by this code:
else if (typlen == -2) { /* cstring */ result = strlen(DatumGetCString(value)) + 1; }
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера