Newbie: upper/lowercase tablenames PostgreSQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

Newbie: upper/lowercase tablenames PostgreSQL

Post by jbakuwel » Tue 02 Feb 2010 05:40

Hi,

I'm new to UniDAC. I'm using a TUniConnection and a TUniTable with a PostgreSQL database.

The TUniTable correctly list all the tables in the PostgreSQL database in the TableName property, however if I select one of the tables (in this case the table is called tMyTable), the error 'relation "tmytable" does not exist' pops up when setting the Active property to True.

Renaming the tablename in PostgreSQL to tmytable "solves" the problem.

What I don't understand is why the TUniTable component is able to list all the tables with correct case (that suggests UniDAC can use mixed case table names), but not use them...

kind regards,
Jan

jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

Rephrase

Post by jbakuwel » Tue 02 Feb 2010 23:46

Hi,

Maybe I need to rephrase my question.

Does UniDAC support mixed case metadata such as table and column names?

Why would I get the error mentioned in my first post when trying to use a mixed case table name even though the TUniTable component lists the tables in the PostgreSQL database with their correct mixed case?

I'm asking because I prefer not to have to change the case of all the tables in all databases...

Jan

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 03 Feb 2010 12:31

To open the table with its name in the correct case you should either set the QuoteNames property to true or specify the name in double quotes.

Post Reply