Re: [HACKERS] char(8) vs char8
| От | Byron Nikolaidis |
|---|---|
| Тема | Re: [HACKERS] char(8) vs char8 |
| Дата | |
| Msg-id | 355B05CC.350843F1@insightdist.com обсуждение исходный текст |
| Ответ на | char(8) vs char8 (darcy@druid.net (D'Arcy J.M. Cain)) |
| Ответы |
Re: [HACKERS] char(8) vs char8
|
| Список | pgsql-hackers |
D'Arcy J.M. Cain wrote: > This was an unexpected difference between these two types and I wonder > if it was meant to be this way. Previously, a char8 field with the > string 'abc' would return 'abc' as expected. Now, with char(8), I get > back 'abc ' instead. You can see this with my PygreSQL module > or the C interface (which my module uses, of course.) This causes a > lot of my programs to break. > char(x) is the datatype 'bpchar' (blank padded char). Thus it is padded with spaces to the field width. Couldn't you use something like "select rtrim(column) from table". This will trim the spaces off. Byron
В списке pgsql-hackers по дате отправления: