From: Kincaid, L. <lw...@sa...> - 2005-02-07 21:11:28
|
Hi Folks- I know there's probably an easy answer to this question but it's not coming to me so I thought I'd ask for help. I think I've successfully built and installed the pyPgSQL module and I know for sure libpq is installed and working because I've used it in a small C program interfacing with my PostgreSQL database. However, in my Python code, the line "from pyPgSQL import PgSQL" causes an error "ImportError: /usr/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so: undefined symbol: lo_export". =20 Any ideas? This is on a PC running Linux Fedora Core 2, Python 2.3 and PostgreSQL 7.3.4. I can always call the C program from Python and that works fairly well but at this point I'm exploring options. Plus, to be honest, it's a little annoying that one way works and the other doesn't so now I'm curious as to why. Any help, thoughts or suggestions would be greatly welcomed. - larry Larry Kincaid Sandia National Laboratories lw...@sa... (505) 845-0125 |
From: Gerhard H. <gh...@gh...> - 2005-02-08 11:19:40
|
On Mon, Feb 07, 2005 at 02:10:58PM -0700, Kincaid, Larry wrote: > Hi Folks- > I know there's probably an easy answer to this question but it's not > coming to me so I thought I'd ask for help. I think I've successfully > built and installed the pyPgSQL module and I know for sure libpq is > installed and working because I've used it in a small C program > interfacing with my PostgreSQL database. However, in my Python code, > the line "from pyPgSQL import PgSQL" causes an error "ImportError: > /usr/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so: undefined > symbol: lo_export". [...] I wonder if it's possible to compile PostgreSQL without Large Object support and wether Fedora has done so. -- Gerhard |
From: Mican B. <mi...@gm...> - 2005-02-08 18:33:34
|
Hello, I write a test python file to connect my postgresql database. My table called Testtabelle. Python always bring an error... "a relation called testtabelle not exists" or so.. So I try to change the tablename from Testtabelle to testtabelle... uups and it works..?? Is this possible that pypgsql only allows tablenames with small letters???? thank you Muhlis |
From: <gh...@gh...> - 2005-02-08 18:51:04
|
Mican Bican wrote: > Hello, > > I write a test python file to connect my postgresql database. My table > called Testtabelle. Python always bring an error... "a relation called > testtabelle not exists" or so.. So I try to change the tablename from > Testtabelle to testtabelle... uups and it works..?? Is this possible > that pypgsql only allows tablenames with small letters???? pyPgSQL has nothing to do with it. Probably the table was created with something like: create table "Testtabelle" and then, case does matter I believe. At least I've seen something like this recently in Oracle. -- Gerhard |
From: Mican B. <mi...@gm...> - 2005-02-08 19:28:39
Attachments:
error1.PNG
|
Gerhard Häring schrieb: > Mican Bican wrote: > >> Hello, >> >> I write a test python file to connect my postgresql database. My >> table called Testtabelle. Python always bring an error... "a relation >> called testtabelle not exists" or so.. So I try to change the >> tablename from Testtabelle to testtabelle... uups and it works..?? Is >> this possible that pypgsql only allows tablenames with small letters???? > > > pyPgSQL has nothing to do with it. Probably the table was created with > something like: > > create table "Testtabelle" > > and then, case does matter I believe. At least I've seen something > like this recently in Oracle. > > -- Gerhard > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Pypgsql-users mailing list > Pyp...@li... > https://lists.sourceforge.net/lists/listinfo/pypgsql-users > I create the tabel with pgadmin, I run the programm with IDLE .. I dont know what is the problem.. all tools are the last version.. i add one screenshot from the error.. probably it is a problem from python?? --Muhlis |
From: Karsten H. <Kar...@gm...> - 2005-02-08 19:27:33
|
You should better post on a PostgreSQL-specific list such as pgsql-general. > I write a test python file to connect my postgresql database. My table > called Testtabelle. Python always bring an error... "a relation called > testtabelle not exists" or so.. So I try to change the tablename from > Testtabelle to testtabelle... uups and it works..?? Is this possible > that pypgsql only allows tablenames with small letters???? The SQL standard says that table names must be case insensitive. It suggests to fold all names to UPPERCASE. PostgreSQL acts by the standard and uses table names case insensitive. However, it folds all names to *lower*case (I tend to agree that is more readable). So, Testtable, TESTtable, tesTTable are all testtable as far as PostgreSQL is concerned. You *can* make PostgreSQL be case sensitive with table names, however: just use quotes ("") around the names -- always ! Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Ben S. <sch...@pr...> - 2005-02-09 05:36:30
|
Unfortunately table names that aren't pure lower-case are a bit annoying. I converted an app from Access to Postgres and changing the code for all the table names wasn't an option. Try changing your select statement to: 'select * from "Farbton"' and see if that doesn't work. Everywhere you reference a table name you will have to enclose it in "". Its up to you to decide which is the bigger pain in the butt to deal with, quoting table names or changing them to lower case in the db structure. good luck, Ben Scherrey Mican Bican wrote: > Gerhard Häring schrieb: > >> Mican Bican wrote: >> >>> Hello, >>> >>> I write a test python file to connect my postgresql database. My >>> table called Testtabelle. Python always bring an error... "a >>> relation called testtabelle not exists" or so.. So I try to change >>> the tablename from Testtabelle to testtabelle... uups and it >>> works..?? Is this possible that pypgsql only allows tablenames with >>> small letters???? >> >> >> >> pyPgSQL has nothing to do with it. Probably the table was created >> with something like: >> >> create table "Testtabelle" >> >> and then, case does matter I believe. At least I've seen something >> like this recently in Oracle. >> >> -- Gerhard >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Pypgsql-users mailing list >> Pyp...@li... >> https://lists.sourceforge.net/lists/listinfo/pypgsql-users >> > I create the tabel with pgadmin, I run the programm with IDLE .. I > dont know what is the problem.. all tools are the last version.. > i add one screenshot from the error.. probably it is a problem from > python?? > > --Muhlis > > ------------------------------------------------------------------------ > |
From: Mican B. <mi...@gm...> - 2005-02-09 07:40:53
|
Ben Scherrey schrieb: > Unfortunately table names that aren't pure lower-case are a bit > annoying. I converted an app from Access to Postgres and changing the > code for all the table names wasn't an option. Try changing your > select statement to: 'select * from "Farbton"' and see if that doesn't > work. Everywhere you reference a table name you will have to enclose > it in "". Its up to you to decide which is the bigger pain in the butt > to deal with, quoting table names or changing them to lower case in > the db structure. > > good luck, Thanks Ben .. this was the problem! So I think I is it better to change all to lower case in the db structure. But I dont understand why this is so?? PgAdminIII generate a sql code, for example create table "Table" ... so thats mean when i create table manually with create table Table, and write a select statement like this: select * from Table without " than its works?? Hmm thanks for your help... (can I turn off the function in pgAdminIII to add the " in the create statements?) --Muhlis |
From: Karsten H. <Kar...@gm...> - 2005-02-09 08:20:21
|
> Thanks Ben .. this was the problem! So I think I is it better to change > all to lower case in the db structure. But I dont understand why this is > so?? Read my previous post. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Jon-Pierre G. <jg...@se...> - 2005-02-11 02:19:49
|
On Wednesday 09 February 2005 01:40 am, Mican Bican wrote: > Thanks Ben .. this was the problem! So I think I is it better to change > all to lower case in the db structure. But I dont understand why this > is so?? PgAdminIII generate a sql code, for example create table > "Table" ... so thats mean when i create table manually with create > table Table, and write a select statement like this: select * from > Table without " than its works?? Hmm thanks for your help... > (can I turn off the function in pgAdminIII to add the " in the create > statements?) pgAdminIII does precisely as you tell it to. It will enclose an=20 identifier in quotation marks if you specify any capital letters in the=20 name. Thus, afterwords, you must specifically quote the name back to it=20 identically otherwise it does not see it correctly. So the moral of the story is, never use capital letters. Or stop using=20 pgAdminIII. :) =20 =2D-=20 _________________________________________________________ Jon-Pierre Gentil PGP: 0xA21BC30E jabber: jg...@se... web: www.sebistar.net "If you think education is expensive, try ignorance." _________________________________________________________=20 |