Обсуждение: Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
CC'ing D'Arcy. Sorry, we really can't backpatch that unless D'Arcy does it. He controls the python interface and applied the patch only to CVS head. --------------------------------------------------------------------------- Gaetano Mendola wrote: > I already post the fact that the file pgdb.py distribuited with > Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!! > > The class pgdbTypeCache is not working with the version 7.3.1 > the method getdescr try to do the following select: > > "SELECT typname, typprtlen, typlen FROM pg_type" > > and the column typprtlen is not anymore available, > I suggested to rewrite that select in this way: > > "SELECT typname, 4, typlen FROM pg_type" > > and someone else suggested: > > "SELECT typname, -1, typlen FROM pg_type" > > > > why was not yet corrected ? > > > Ciao > Gaetano > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
* Bruce Momjian <pgman@candle.pha.pa.us> [2003-01-07 17:13 -0500]: > CC'ing D'Arcy. > > Sorry, we really can't backpatch that unless D'Arcy does it. He > controls the python interface and applied the patch only to CVS head. > > --------------------------------------------------------------------------- > > Gaetano Mendola wrote: > > I already post the fact that the file pgdb.py distribuited with > > Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!! > > > > The class pgdbTypeCache is not working with the version 7.3.1 > > the method getdescr try to do the following select: > > > > "SELECT typname, typprtlen, typlen FROM pg_type" > > > > and the column typprtlen is not anymore available, > > I suggested to rewrite that select in this way: > > > > "SELECT typname, 4, typlen FROM pg_type" > > > > and someone else suggested: > > > > "SELECT typname, -1, typlen FROM pg_type" That was me. This, however is WRONG, (and I'll also have to fix it in pyPgSQL eventually). I recently asked a related question in the Python DB-SIGs mailing list recently in a thread "cursor.description - values for 'I don't know'" asking which value to use for unknown values in cursor.description (here: the displaysize field). The answer is to use None for unknown values, *not* -1 like I proposed above. In fact, the DB-API 2.0 specification clearly says so, but it somehow slipped my eye. Gerhard -- Favourite database: http://www.postgresql.org/ Favourite programming language: http://www.python.org/ Combine the two: http://pypgsql.sf.net/ Embedded database for Python: http://pysqlite.sf.net/
On Tuesday 07 January 2003 17:13, Bruce Momjian wrote: > Sorry, we really can't backpatch that unless D'Arcy does it. He > controls the python interface and applied the patch only to CVS head. "Controls" is probably too strong a word. "Leads" is more like it since we merged the projects. I'm not sure what is being asked for here. Is there some sort of pull-up (or pull-down) required? There's not much on the site explaining this. -- 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 425 1212 (DoD#0082) (eNTP) | what's for dinner.
"D'Arcy J.M. Cain" <darcy@druid.net> writes: > I'm not sure what is being asked for here. We'd like to put the typlen fix into the REL7_3_STABLE CVS branch. Also any other post-7.3 fixes that you consider appropriate for 7.3.2 (ie, important, low-risk fixes). If you're not comfortable enough with CVS-munging to want to touch branches other than HEAD, Bruce or I can handle it for you. Just let us know exactly which changes should be back-patched. regards, tom lane
On Tuesday 07 January 2003 23:12, Tom Lane wrote: > "D'Arcy J.M. Cain" <darcy@druid.net> writes: > > I'm not sure what is being asked for here. > > We'd like to put the typlen fix into the REL7_3_STABLE CVS branch. > Also any other post-7.3 fixes that you consider appropriate for 7.3.2 > (ie, important, low-risk fixes). I also just fixed that file again. As someone else just pointed out, we need to return None instead of -1 there. > If you're not comfortable enough with CVS-munging to want to touch > branches other than HEAD, Bruce or I can handle it for you. Just let > us know exactly which changes should be back-patched. Sure. Just that one and the one I just made I think. Other things were mainly feature additions. If you can tell me what the process is or point me to the relevant docs I can do this myself in the future. I want to walk softly here because I know that different projects have different rules and methods for these sorts of things. -- 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 425 1212 (DoD#0082) (eNTP) | what's for dinner.
On Tuesday 07 January 2003 18:28, Gerhard Häring wrote: > I recently asked a related question in the Python DB-SIGs mailing list > recently in a thread > > "cursor.description - values for 'I don't know'" > > asking which value to use for unknown values in cursor.description > (here: the displaysize field). > > The answer is to use None for unknown values, *not* -1 like I proposed > above. In fact, the DB-API 2.0 specification clearly says so, but it > somehow slipped my eye. I have fixed this in HEAD. -- 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 425 1212 (DoD#0082) (eNTP) | what's for dinner.
D'Arcy J.M. Cain wrote: > On Tuesday 07 January 2003 23:12, Tom Lane wrote: > > "D'Arcy J.M. Cain" <darcy@druid.net> writes: > > > I'm not sure what is being asked for here. > > > > We'd like to put the typlen fix into the REL7_3_STABLE CVS branch. > > Also any other post-7.3 fixes that you consider appropriate for 7.3.2 > > (ie, important, low-risk fixes). > > I also just fixed that file again. As someone else just pointed out, we need > to return None instead of -1 there. > > > If you're not comfortable enough with CVS-munging to want to touch > > branches other than HEAD, Bruce or I can handle it for you. Just let > > us know exactly which changes should be back-patched. > > Sure. Just that one and the one I just made I think. Other things were > mainly feature additions. If you can tell me what the process is or point me > to the relevant docs I can do this myself in the future. I want to walk > softly here because I know that different projects have different rules and > methods for these sorts of things. What I normally do is to do a separate checkout for the branch I want to patch. In this case, a cvs log on /HISTORY shows it as: REL7_3_STABLE: 1.182.0.2 You know it is a branch rather than a tag because it has four numbers. (The developers FAQ has stuff on this.) I then make changes to that CVS, and do a commit while sitting in that CVS tree. I applies the changes against that branch only. I usually get a cvs diff from the HEAD tree, and apply that patch file against the branch. Let me know if you would like me to do it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073