Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Michael P. Soulier said: > lots and lots of whitespace. I think it's in the db. Ah, they're not varchars, they're character columns. That explains it... signature.asc Description: Digital signature

Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Michael P. Soulier said: > still, in my app I see a lot of trailing whitespace after reading from the > db... [root@vmbg-msoulier3 eventviewer]# PYTHONPATH=.. python manage.py shell Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type

Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Adrian Klaver said: > Works here: > test=> SELECT version(); > version > --- > PostgreSQL 9.0.7 on i686-pc-linux-gnu, compiled by GCC gcc (SUSE > Linux) 4.6.2, 3

Re: [GENERAL] trimming a column

2012-05-03 Thread Adrian Klaver
On 05/03/2012 06:01 PM, Michael P. Soulier wrote: Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Works here: test=> SELECT v

Re: [GENERAL] trimming a column

2012-05-03 Thread Adrian Klaver
On 05/03/2012 06:55 PM, Greg Williamson wrote: Michael -- Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Mike The trim f

Re: [GENERAL] trimming a column

2012-05-03 Thread Greg Williamson
Michael -- >Hi, > >I need to trim whitespace off of a whole column and replace the existing >values with the trimmed ones. > >This isn't working > >update mytable set id = trim(id); > >I'm not sure of the correct syntax. Help appreciated. > >Mike > The trim function needs to be told what sort of

[GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Mike signature.asc Description: Digital signature