[sqlalchemy] postgres character(num) issue

2010-04-15 Thread Eric Lemoine
Hi I use PostgreSQL and I have this column if one of my tables: ens character(60). I use autoload in my model for that table. SQLAlchemy 0.5.8 always gives me strings with 60 characters (with trailing spaces) when doing queries. I wouldn't expect that. Is there a way to change that behavior?

Re: [sqlalchemy] postgres character(num) issue

2010-04-15 Thread Michael Bayer
you'd use VARCHAR, CHAR is fixed width. If you want to force it, use a TypeDecorator that calls strip() on the returned values. On Apr 15, 2010, at 5:28 AM, Eric Lemoine wrote: Hi I use PostgreSQL and I have this column if one of my tables: ens character(60). I use autoload in my model

Re: [sqlalchemy] postgres character(num) issue

2010-04-15 Thread Eric Lemoine
On Thu, Apr 15, 2010 at 2:12 PM, Michael Bayer mike...@zzzcomputing.com wrote: you'd use VARCHAR, CHAR is fixed width.   If you want to force it, use a TypeDecorator that calls strip() on the returned values. Yes, thanks. I got confused because of the concat operator (||) in PostgreSQL. The