You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(18) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(11) |
Feb
(7) |
Mar
(7) |
Apr
(7) |
May
(17) |
Jun
(33) |
Jul
(19) |
Aug
(3) |
Sep
(19) |
Oct
(18) |
Nov
(27) |
Dec
(13) |
2003 |
Jan
(12) |
Feb
(8) |
Mar
(11) |
Apr
(42) |
May
(19) |
Jun
(49) |
Jul
(23) |
Aug
(12) |
Sep
(2) |
Oct
(8) |
Nov
(8) |
Dec
(13) |
2004 |
Jan
(13) |
Feb
(2) |
Mar
(7) |
Apr
(7) |
May
(6) |
Jun
(13) |
Jul
(4) |
Aug
(12) |
Sep
(6) |
Oct
(6) |
Nov
(50) |
Dec
(10) |
2005 |
Jan
(20) |
Feb
(20) |
Mar
(2) |
Apr
(10) |
May
(12) |
Jun
(7) |
Jul
|
Aug
(4) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(3) |
Jun
(17) |
Jul
(2) |
Aug
(8) |
Sep
(1) |
Oct
(5) |
Nov
(3) |
Dec
(2) |
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2009 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: gerhard q. <gq...@sk...> - 2003-10-21 17:41:34
|
Hi Terry, try this: try: do query except PgSQL.OperationalError, msg: ... Cheers, Gerhard -------------- Terry MacDonald wrote: > Hi,=20 >=20 > I am fairly new to using python and pypgsql and what I may ask here may= > be solved by the obvious, so my apologies if this sounds dumb, but I > have looked around all the (sparse) documentation and found nothing tha= t > helps. Anyway how do I get my program, that imports pgSQL, to recognise= > the DB API exception values, e.g. OperationalError, for when I place > them in a try...except block ala...=20 >=20 > try:=20 > do query=20 > except OperationalError:=20 > ....=20 >=20 > ...I get the following error:=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = > Traceback (most recent call last):=20 >=20 > File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line > 335, in HandlerDispatch=20 > result =3D object(req)=20 >=20 > File "/usr/lib/python2.2/site-packages/mod_python/publisher.py", line= > 194, in handler=20 > result =3D apply(object, (), args)=20 >=20 > File "/var/www/html/python/cricket.py", line 60, in registerLeague=20 > except OperationalError:=20 >=20 > NameError: global name 'OperationalError' is not defined=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =20 >=20 > I would have thought the imported module, in this case pgSQL, would hav= e > defined them and made them available to calling modules, but obviously > this is not the case.=20 >=20 > Any help much appreciated and I am sure the solution will educate me > more in how python works and how to use it.=20 >=20 > Cheers,=20 >=20 > Terry=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by OSDN developer relations > Here's your chance to show off your extensive product knowledge > We want to know what you know. Tell us and you have a chance to win $10= 0 > http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 > _______________________________________________ > Pypgsql-users mailing list > Pyp...@li... > https://lists.sourceforge.net/lists/listinfo/pypgsql-users >=20 --=20 ------------------------------------------------------ skequell ------ Gerhard Quell Software & Knowledge Engineering Sch=FCtzenweg 3 eMail: gq...@sk... Fon: 0731-26400651 89275 Elchingen web : http://www.skequell.de Fax: 0731-26400652 ---Aus Sicherheitsgr=FCnden: bitte keine Word-, Excel-Dateianh=E4nge ----= - |
From: Terry M. <te...@i3...> - 2003-10-21 13:20:02
|
Hi, I am fairly new to using python and pypgsql and what I may ask here may be solved by the obvious, so my apologies if this sounds dumb, but I have looked around all the (sparse) documentation and found nothing that helps. Anyway how do I get my program, that imports pgSQL, to recognise the DB API exception values, e.g. OperationalError, for when I place them in a try...except block ala... try: do query except OperationalError: .... ...I get the following error: ========================================================================= Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 335, in HandlerDispatch result = object(req) File "/usr/lib/python2.2/site-packages/mod_python/publisher.py", line 194, in handler result = apply(object, (), args) File "/var/www/html/python/cricket.py", line 60, in registerLeague except OperationalError: NameError: global name 'OperationalError' is not defined ========================================================================== I would have thought the imported module, in this case pgSQL, would have defined them and made them available to calling modules, but obviously this is not the case. Any help much appreciated and I am sure the solution will educate me more in how python works and how to use it. Cheers, Terry |
From: Christian T. <ct...@go...> - 2003-10-08 07:42:21
|
Hi, Or just go on and use the one in CVS. We are using it extensively and it just works. Am Di, 2003-10-07 um 08.37 schrieb Gerhard H=E4ring: >=20 > I'd recommend you just use the adapter for psycopg. ZPyPgSQLDA was=20 > nothing more than this one hacked to work with pyPgSQL, anyway. Christian --=20 Christian Theune, gocept gmbh & co. kg http://www.gocept.com - ct...@go... fon: 03496 3099112 fax: 03496 3099118 mobile: 0179 7808366 |
From: pypgsql <py...@ev...> - 2003-10-07 09:55:28
|
Any chance to get an rpm package of the last 2.4 version for python 2.3 ? It seems the file pyPgSQL-2.4-0.i386-RH9.0.rpm works only with python 2.2. Thx |
From: <gh...@gh...> - 2003-10-07 06:36:23
|
Tim Middleton wrote: > So what ever happened to ZPyPgSQLDA? I can't seem to find any recent traces of > it. The previous home page seems to be gone. A search on zope.org turns up > nothing... is it, in whatever state it was in, available anywhere? It's in CVS. It never got developed any further than the initial hack that it was, though. I haven't had a chance to use ZOPE since then, so I stopped development. I'd recommend you just use the adapter for psycopg. ZPyPgSQLDA was nothing more than this one hacked to work with pyPgSQL, anyway. If your concern is that it needs to run on Windows, psycopg can nowadays be built on Windows. Just ask on its mailing list :-) -- Gerhard |
From: Tim M. <x...@Ve...> - 2003-10-06 23:13:06
|
So what ever happened to ZPyPgSQLDA? I can't seem to find any recent traces of it. The previous home page seems to be gone. A search on zope.org turns up nothing... is it, in whatever state it was in, available anywhere? -- Tim Middleton | Cain Gang Ltd | Then suddenly, for no apparent reason, the x...@ve... | www.Vex.Net | unpittying orchestra struck up a polka. -D |
From: Billy G. A. <bg...@de...> - 2003-09-23 03:53:09
|
I appoligize for the spam that got through to the list. I have adjusted the list parameters so that this /*should*/ not happen again. Later. -- ____ | Billy G. Allie | Domain....: Bil...@mu... | /| | 7436 Hartwell | MSN.......: B_G...@em... |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | |
From: <gdr...@ya...> - 2003-08-27 22:16:15
|
--- Jorge Godoy <go...@ie...> escribió: > > Hi. > > > I have to feed a database with several hundred > entries and I am > importing all those with PostgreSQL's 'COPY <table> > FROM <file>' > command. It works great when I'm using my superuser > but it fails for > any other user with a message specifying that I > should either: > > * use my superuser > * make these users superuser > * or use 'stdin' (this is the recommendation on > the error message) > as source for my input. > > Since I can't make other superusers (there are > several other databases > there that should be protected from common > employees) I was trying to > use stdin as data source. > > Anybody has tried it? I don't know how to > concatenate the thousands of > lines from the output of a 'file.readlines()' (or > something like that) > to my cursor.execute() command. Using something like > "cursor.execute(query_sql, file.readlines())" didn't > work and gave me > an error message saying 'not all arguments > converted' (query_sql is > the copy from command). Hello: Try this idea. mycursor.execute('copy '+table+' from stdin;') lines=file.read() for n in lines: mycursor.conn.conn.putline(n) mycursor.conn.conn.putline('\\.\n') #end of insertion mycursor.conn.conn.endcopy() myconnection.commit() #to make insertions available _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com |
From: Jorge G. <go...@ie...> - 2003-08-27 18:55:59
|
Hi. I have to feed a database with several hundred entries and I am importing all those with PostgreSQL's 'COPY <table> FROM <file>' command. It works great when I'm using my superuser but it fails for any other user with a message specifying that I should either: * use my superuser * make these users superuser * or use 'stdin' (this is the recommendation on the error message) as source for my input. Since I can't make other superusers (there are several other databases there that should be protected from common employees) I was trying to use stdin as data source. Anybody has tried it? I don't know how to concatenate the thousands of lines from the output of a 'file.readlines()' (or something like that) to my cursor.execute() command. Using something like "cursor.execute(query_sql, file.readlines())" didn't work and gave me an error message saying 'not all arguments converted' (query_sql is the copy from command). TIA, -- Godoy. <go...@ie...> |
From: <gdr...@ya...> - 2003-08-13 15:02:54
|
--- robert ackerman <rd...@pa...> escribió: > is it possible (easy?) to get field names and types > from postgresql > using pyPgSQL? > i did it before using libpq calls, but can it be > done with the high > level interface? > guess i can use high level for everything except > getting > fieldnames/types. > > > > - Hi Robert: I used an sql way to solve that problem. It worked fine --------------------------- #captures the meta-information from a table query="select a.attname, t.typname, a.attlen, a.atttypmod" query=query+" from pg_type t, pg_attribute a, pg_class c" query=query+" where c.relname = '" + tablename + "'" query=query+" and c.relfilenode = a.attrelid and a.attnum > 0" query=query+" and a.atttypid = t.oid;" try: curlocal.execute(query) except PgSQL.Error, msg: return 'query fail' --------------------------- Postgres mantains all the meta-information about tables in tables as well. I just looked inside them and made some joins to handle all the information i'd needed.(it wasnt easy) I hope it works for you. _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com |
From: <gh...@gh...> - 2003-08-13 14:51:00
|
Cc-ing pypgsql-users, let's please keep the discussion there :) Dick Kniep wrote: > Hi Gerhard, > >>Do you mean the displaysize field of cursor.description? > > Yes > >>In newer pyPgSQL releases this is indeed always set to None, because PostgreSQL >>versions 7.3 and later provide no means of getting at this information >>any more. > > Why is this? Is there a rationale for this? Dunno. You could check the PostgreSQL archives. I personally never found this attribute useful. > I thought it was pretty handy to have these values available? Are you really having problems with the 'display_size' field? Qutoing the DB-API spec (PEP 0249): """ .description This read-only attribute is a sequence of 7-item sequences. Each of these sequences contains information describing one result column: (name, type_code, display_size, internal_size, precision, scale, null_ok). The first two items (name and type_code) are mandatory, the other five are optional and must be set to None if meaningfull values are not provided. """ > Is there an alternative to get these values? For display_size, no. If a different field doesn't work as expected, we need to know which one it is. -- Gerhard |
From: <gh...@gh...> - 2003-08-13 12:06:26
|
Dick Kniep wrote: > Hi there, > > We are using pyPgSQL for a fairly complex system, and sofar everything > worked very nicely, especially in combination with SQLDict. With the new > version (2.4) however, there seems to be a problem with the description > list. > > The following code is used to get the description of the fields from a > table: > [...] > I am also using the length parameter of the fields. In the previous > version of pyPgSQL this was all working perfectly. However, in the > current version, if I have a char field, no length is returned. So the > program crashes when it wants to use this length. Do you mean the displaysize field of cursor.description? In newer pyPgSQL releases this is indeed always set to None, because PostgreSQL versions 7.3 and later provide no means of getting at this information any more. -- Gerhard |
From: Dick K. <D.J...@ch...> - 2003-08-13 09:00:45
|
Hi there, We are using pyPgSQL for a fairly complex system, and sofar everything worked very nicely, especially in combination with SQLDict. With the new version (2.4) however, there seems to be a problem with the description list. The following code is used to get the description of the fields from a table: --------- snip ---------------- def __BldTabDef(self): """ Bouw gegevens over de te onderhouden tabel op """ Sqlstmt = 'Select * from ' + self.table veldlist = [] Opendb.TableObjs.hcur.execute(Sqlstmt) rr = Opendb.TableObjs.hcur.fetchone() for x in Opendb.TableObjs.hcur.description: veldnm = strip(x[0]) self.__GetFldDefinition(veldnm,x) veldlist.append(veldnm) self.columns = tuple(veldlist) setattr(self.__class__,"columns",self.columns) --------- snip ---------------- This way I don't need to specify the columns in the Class definitions of the SQLDict definition of the objects. I am also using the length parameter of the fields. In the previous version of pyPgSQL this was all working perfectly. However, in the current version, if I have a char field, no length is returned. So the program crashes when it wants to use this length. Has anyone had any experience with this? Kind regards, D.Kniep |
From: robert a. <rd...@pa...> - 2003-08-13 02:45:29
|
On Tuesday, August 12, 2003, at 05:17 PM, Gerhard H=E4ring wrote: > robert ackerman wrote: >> is it possible (easy?) to get field names and types from postgresql=20= >> using pyPgSQL? >> i did it before using libpq calls, but can it be done with the high=20= >> level interface? >> guess i can use high level for everything except getting=20 >> fieldnames/types. > > I don't know exactly what you mean. The only meta-information pyPgSQL=20= > readily offers is that mandated by the DB-API. the .description field=20= > of the cursor object. > > If what you want is look which columns/types a table/view has, I'd=20 > recommend you start psql with the option -E and hit \d tablename, then=20= > look at the select that psql uses. You should be able to easily adapt=20= > it to your needs. > i meant in a cgi script where it is desired to show table entries with=20= column names and types out to the client's browser. 'description' is=20 what i want. thanks. |
From: <gh...@gh...> - 2003-08-13 00:44:12
|
robert ackerman wrote: > is it possible (easy?) to get field names and types from postgresql > using pyPgSQL? > i did it before using libpq calls, but can it be done with the high > level interface? > guess i can use high level for everything except getting fieldnames/types. I don't know exactly what you mean. The only meta-information pyPgSQL readily offers is that mandated by the DB-API. the .description field of the cursor object. If what you want is look which columns/types a table/view has, I'd recommend you start psql with the option -E and hit \d tablename, then look at the select that psql uses. You should be able to easily adapt it to your needs. Or did you mean something different? -- Gerhard |
From: robert a. <rd...@pa...> - 2003-08-12 23:48:50
|
is it possible (easy?) to get field names and types from postgresql using pyPgSQL? i did it before using libpq calls, but can it be done with the high level interface? guess i can use high level for everything except getting fieldnames/types. |
From: robert a. <rd...@pa...> - 2003-08-12 18:43:38
|
On Tuesday, August 12, 2003, at 05:46 AM, Bob Ippolito wrote: > You need to link to libcrypto and libssl.. they're in /usr/lib, so you > don't need to add the directories, just the libraries. > > Why don't you just use my binary distribution? Use this from Package > Manager: > http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist > very good. thanks. |
From: Bob I. <bo...@re...> - 2003-08-12 13:11:35
|
You need to link to libcrypto and libssl.. they're in /usr/lib, so you don't need to add the directories, just the libraries. Why don't you just use my binary distribution? Use this from Package Manager: http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist On Tuesday, Aug 12, 2003, at 01:22 America/New_York, robert ackerman wrote: > in setup.py, i set custom include and lib to: > include_dirs = ["/Library/PostgreSQL/include"] > library_dirs = ["/Library/PostgreSQL/lib"] > > do i need other dirs? > > i get errors: > % python setup.py build > /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ > distutils/dist.py:213: UserWarning: 'licence' distribution option is > deprecated; use 'license' > warnings.warn(msg) > running build > running build_py > running build_ext > building 'pyPgSQL.libpq.libpqmodule' extension > gcc -Wl,-x -Wl,-F. -bundle -framework Python > build/temp.darwin-6.6-Power_Macintosh-2.3/libpqmodule.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgboolean.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgint2object.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgint8object.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgversion.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pglargeobject.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgnotify.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgconnection.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pgresult.o > build/temp.darwin-6.6-Power_Macintosh-2.3/pymemstrdup.o > build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtoll.o > build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtoull.o > build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtok.o > -L/Library/PostgreSQL/lib -lpq -o > build/lib.darwin-6.6-Power_Macintosh-2.3/pyPgSQL/libpq/libpqmodule.so > ld: Undefined symbols: > _ERR_get_error > _ERR_reason_error_string > _SSL_CTX_new > _SSL_connect > _SSL_free > _SSL_library_init > _SSL_load_error_strings > _SSL_new > _SSL_set_fd > _SSLv23_method > _SSL_read > _SSL_write > error: command 'gcc' failed with exit status 1 > > > _______________________________________________ > Pythonmac-SIG maillist - Pyt...@py... > http://mail.python.org/mailman/listinfo/pythonmac-sig |
From: robert a. <rd...@pa...> - 2003-08-12 05:53:06
|
in setup.py, i set custom include and lib to: include_dirs = ["/Library/PostgreSQL/include"] library_dirs = ["/Library/PostgreSQL/lib"] do i need other dirs? i get errors: % python setup.py build /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ distutils/dist.py:213: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running build running build_py running build_ext building 'pyPgSQL.libpq.libpqmodule' extension gcc -Wl,-x -Wl,-F. -bundle -framework Python build/temp.darwin-6.6-Power_Macintosh-2.3/libpqmodule.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgboolean.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgint2object.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgint8object.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgversion.o build/temp.darwin-6.6-Power_Macintosh-2.3/pglargeobject.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgnotify.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgconnection.o build/temp.darwin-6.6-Power_Macintosh-2.3/pgresult.o build/temp.darwin-6.6-Power_Macintosh-2.3/pymemstrdup.o build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtoll.o build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtoull.o build/temp.darwin-6.6-Power_Macintosh-2.3/port/strtok.o -L/Library/PostgreSQL/lib -lpq -o build/lib.darwin-6.6-Power_Macintosh-2.3/pyPgSQL/libpq/libpqmodule.so ld: Undefined symbols: _ERR_get_error _ERR_reason_error_string _SSL_CTX_new _SSL_connect _SSL_free _SSL_library_init _SSL_load_error_strings _SSL_new _SSL_set_fd _SSLv23_method _SSL_read _SSL_write error: command 'gcc' failed with exit status 1 |
From: Karsten H. <Kar...@gm...> - 2003-07-30 23:24:47
|
> However, some larger companies want to use the application as well. One > company has some 15 locations where people are working. Off course this > can be supported with high bandwidth online connections, but these > connections are expensive, and unreliable. Therefor I have been looking > for a way to get rid of the direct online connection. So, what I want is > a local connection to the database, with asynchronous updates to > databases that are in the same 'logical' cluster of databases. c-jdbc > looks like the proper candidate for this action, however no luck because > we developed using Python..... Sounds like you are looking at a middleware-solution where frontends talk to a locally running server (say, XML-RPC one) which in turn talks to the DBs (or not if disconnected). You might start working against a hot-spare DB on the local host when the remote DB goes dead and start logging all SQL statements during disconnected operation. Once reconnected you can try replaying the DML log (which isn't guaranteed to succeed due to other users' DMLs). Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Jorge G. <go...@ie...> - 2003-07-30 22:37:51
|
Gerhard H=E4ring <gh...@gh...> writes: > You're not using pyPgSQL 2.4. Instead you're using a much older > pyPgSQL version which isn't compatible with PostgreSQL 7.3, yet. > > In pyPgSQL 2.4, this line looks differently. Indeed. I'm sorry. He had pyPgSQL 2.2 instead of pyPgSQL 2.4... (This is not my fault, I passed the programs and respective version numbers but...) Thanks. --=20 Godoy. <go...@ie...> |
From: <gh...@gh...> - 2003-07-30 20:13:28
|
Jorge Godoy wrote: > Hi! > > > We have a machine here with Windows XP and we're having some error > messages when trying to query the database. Is there some secret to > make it work? We're using pyPgSQL 2.4 compyled for Python 2.2 from the > SF website. > [...] > File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 789, in > getTypeInfo > _res = self.__conn.conn.query("SELECT typname, typprtlen, typelem " > libpq.OperationalError: ERROR: Attribute "typprtlen" not found You're not using pyPgSQL 2.4. Instead you're using a much older pyPgSQL version which isn't compatible with PostgreSQL 7.3, yet. In pyPgSQL 2.4, this line looks differently. > Any hints? Yes, be sure you have pyPgSQL 2.4 installed. Uninstall/remove any older pyPgSQL files. -- Gerhard |
From: Jorge G. <go...@ie...> - 2003-07-30 19:41:55
|
Hi! We have a machine here with Windows XP and we're having some error messages when trying to query the database. Is there some secret to make it work? We're using pyPgSQL 2.4 compyled for Python 2.2 from the SF website. The same packages were installed on a Windows 98 from a client of mine and everything is working perfectly. I can also access the server from my application in a Linux machine. All GRANTs were successful for both users (the W98 and WXP users) and the database in both servers are configured equally. The error message makes me think there's something missing or misbehaving with pyPgSQL here. ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Documents and Settings\juliano.G2CTECH\Desktop\Relat\relatorios.py", line 912, in AtualizarTela dados = query.ExecutaBusca(ordenarPor[pagina], filtros) File "C:\Documents and Settings\juliano.G2CTECH\Desktop\Relat\FazBuscas.py", line 107, in ExecutaBusca self.dados.execute(sql_query) File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 2612, in execute self.__makedesc__() File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 2327, in __makedesc__ _tn, _pl, _ia, _bt = _cache.getTypeInfo(_typ) File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 789, in getTypeInfo _res = self.__conn.conn.query("SELECT typname, typprtlen, typelem " libpq.OperationalError: ERROR: Attribute "typprtlen" not found ---------------------------------------------------------------------- Any hints? Thanks in advance, -- Godoy. <go...@ie...> |
From: Alvaro H. <alv...@dc...> - 2003-07-29 20:52:47
|
On Wed, Jul 30, 2003 at 08:38:47AM +1200, Rob Brown-Bayliss wrote: > INSERT INTO "songs" ("p_key", "title", "artist", "date", "album", > "tracknumber", "time", "file") VALUES > ("ea0e89f596619af1837f424c0767ffd9", "Sugar Mountain", "Neil Young", > "1979", "Live Rust", "1", "302.226666667", > "/oggs/Neil_Young-Sugar_Mountain.ogg"); Huh... don't use double quotes in literal values, just single quotes: INSERT INTO "songs" ("p_key", "title", "artist", "date", "album", "tracknumber", "time", "file") VALUES ('ea0e89f596619af1837f424c0767ffd9', 'Sugar Mountain', 'Neil Young', '1979', 'Live Rust', '1', '302.226666667', '/oggs/Neil_Young-Sugar_Mountain.ogg'); -- Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) "El miedo atento y previsor es la madre de la seguridad" (E. Burke) |
From: Eric C. <ec...@ze...> - 2003-07-29 20:47:41
|
On Tue, 2003-07-29 at 13:38, Rob Brown-Bayliss wrote: > > Hi, Running the following SQL via pypgsql: > > INSERT INTO "songs" ("p_key", "title", "artist", "date", "album", > "tracknumber", "time", "file") VALUES > ("ea0e89f596619af1837f424c0767ffd9", "Sugar Mountain", "Neil Young", > "1979", "Live Rust", "1", "302.226666667", > "/oggs/Neil_Young-Sugar_Mountain.ogg"); Double quotes are reserved for identifier's like table and column names. You should use single quotes's for your values. phpPgAdmin is probably rewriting your statement. Eric |