From: Dick K. <D.J...@ch...> - 2003-05-05 08:20:38
|
Hi Billy/list, It was just a stupd mistake. Small change, now it works..... Thanks for your assistence Kind regards On Thu, 2003-05-01 at 05:21, Billy G. Allie wrote: > Dick Kniep wrote: > > >Hi List, > > > >The last 6 month I have been developing a system with Python, wxPython > >and pyPgSQL. I use Python 2.2.2, PostgreSQL 7.3.2 (the latest) and > >pyPgSQL 2.3 > > > >Mostly, it works great. Thanks to all contributors. > > > >However, lately I saw a strange phenomenon. When I use the following > >select statement : > > > >Select last-value from tabellen_tab-id_seq; > > > >where tabellen_tab-id_seq is a Postgresql sequence, I get back a number > >followed by an 'L' so in this case the result was > >[547L]. Obviously this fails in the rest of my code, because I expect an > >integer. > > > >I think it might have something to do with the fact that in PostgreSQL > >this is an 8 byte int, but I am not sure.... > > > > > This is strage. The result of a serial8 field should be a BIGINT, which > is handled as a PgInt8 type. > Does your system have native 8-byte int (long long) support. If not the > BIGINTs are supported > using Python's Long integer type (hence the L at the end of the number). > > How is the long integer failing in the rest of your code? Printing the > value will not display the 'L'. > Using the str() function on the number will not place an 'L' in the > resulting string. The only time > the 'L' is display is in the result of using the repr() function on the > number, so how is your code > failing? (If I know how it's failing I may be able to help fix it.) > > -- > ___________________________________________________________________________ > ____ | Billy G. Allie | Domain....: Bil...@mu... > | /| | 7436 Hartwell | MSN.......: B_G...@em... > |-/-|----- | Dearborn, MI 48126| > |/ |LLIE | (313) 582-1540 | > > |