SELECT * FROM tbl;
returns a totally different table than
SELECT * FROM "tbl";
That's a little disconcerting.
For the capitalization thing basically what's going on is two things. (The way I understand it)
1) Postgres IS case sensitive.
2) When any query gets sent to the server, the server converts everything not inside quotes to lower case as step 1,
_before_trying to match names for tables, columns, functions, etc.
So if you send
SELECT * FROM TBL;
One of the first things the server does is change it to
select * from tbl;
at which point it will do a case-sensitive match for tbl
And if you run
SELECT * FROM "TBL";
it gets turned into
select * from "TBL";
at which point it will do a case-sensitive match for TBL
But in your case what is in quotes is the same as its lowercase version. So it "should" match up to the same thing. So
ifyou are indeed getting different results from different tables then either my understanding is way off, or something
weirdis going on.