Re: [HACKERS] char(8) vs char8

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: [HACKERS] char(8) vs char8
Дата
Msg-id m0ya1Wm-000035C@druid.net
обсуждение исходный текст
Ответ на Re: [HACKERS] char(8) vs char8  (Byron Nikolaidis <byronn@insightdist.com>)
Список pgsql-hackers
Thus spake Byron Nikolaidis
> > string 'abc' would return 'abc' as expected.  Now, with char(8), I get
> > back 'abc     ' instead.  You can see this with my PygreSQL module
>
> Couldn't you use something like "select rtrim(column) from table".  This
> will trim the spaces off.

It wouldn't be as convenient as this example.

import pg
for d in pg.connect('database').query('select * from table').dictresult():
    print "Num: %(field1)3d, '%(field2)s'" % d

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

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

Предыдущее
От: "Göran Thyni"
Дата:
Сообщение: Re: AW: [HACKERS] mmap and MAP_ANON
Следующее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: Re: [HACKERS] char(8) vs char8