Re: tables with small letters?

Ben Scherrey <[email protected]> Wed, 09 Feb 2005 00:36:23 -0500
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
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
>> [email protected]
>> 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
>
> ------------------------------------------------------------------------
>



-------------------------------------------------------
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