weird beginner's problem with PostgreSQL

This is my fist encounter with PostGreSQL
I have created the tables and columns. Everything looks sweet in pgAdmin.
Connection works. However, when I try to access a table, I have inconsistent results.
Dim sql As String = “SELECT max(rowid) from " + s // (s = tablename)
If the tablename is summary, this works
For all other tables, the error mesg is " relation “tablename” does not exist”
i need to put add " to the tablename and it works
If I do the same with summary, the sql throws the same error as for the other tables without "

I get the same result using direct sql in pgAdmin

I checked ownership, etc - they are all identical

Any ideas?

If you quote the table names postgres will honor your capitalization.
So if your tablename is Customer you need to say: Select * from “Customer” .
If otoh your tablename is customer than saying Select * from Customer also works, because the PG parser converts this to:
Select * from customer

Usually it is a good idea to not use any capital letters in table names.

[quote=258529:@Maximilian Tyrtania]If you quote the table names postgres will honor your capitalization.
So if your tablename is Customer you need to say: Select * from “Customer” .
If otoh your tablename is customer than saying Select * from Customer also works, because the PG parser converts this to:
Select * from customer

Usually it is a good idea to not use any capital letters in table names.[/quote]
fields too.

Postgresql prefers lower case - go figure

Yes, any database object actually, so also procedure names, database names, user names, enums, types, anything.

Haha, yeah. Actually it is PostgreSQL, but remember to refer to it as “PostgreSQL” (quoted) if you talk to the PG parser…

Thank you all - you have been great help