Re: [HACKERS] char(8) vs char8

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: byronn(at)insightdist(dot)com (Byron Nikolaidis)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] char(8) vs char8
Date: 1998-05-14 17:10:44
Message-ID: m0ya1Wm-000035C@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at){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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1998-05-14 17:12:21 Re: [HACKERS] char(8) vs char8
Previous Message Thomas G. Lockhart 1998-05-14 15:27:18 Re: [HACKERS] char(8) vs char8