Re: [SQLObject] varchar vs varchar(100)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2005-02-10 17:52:53
|
On Thu, Feb 10, 2005 at 11:46:34AM -0600, Ian Bicking wrote: > Oleg Broytmann wrote: > >BTW, will you commited the fix? > > I actually haven't been able to see the error yet. Maybe it's a PG 7.2 > thing? Ben have said he runs Pg 8.0. > I can't figure it out; if you can get the test to fail > (test_auto) and then pass with this fix, I'd feel better that we were > doing a sufficient test. I'll try it on Pg 7.2. > >On Tue, Feb 08, 2005 at 04:53:03PM -0500, Ben Scherrey wrote: > > > >>Ok, here's a hack fix I threw in that works for both cases of VARCHAR > >>and VARCHAR(n): > >>pgconnection.py:197 > >> def guessClass(self, t): > >> if t.count('int'): > >> return col.IntCol, {} > >> elif t.count('varying'): > >> if '(' in t: > >> return col.StringCol, {'length': int(t[t.index('(')+1:-1])} > >> return col.StringCol, {} Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |