I had this strange problem using PostgreSQL 9.3 with tables created using qoutes. For example, if I create a table using qoutes:
create table "TEST" ("Col1" bigint);
the table is correctly created, and I see that the quotes are saved when viewed in the pgAdminIII SQL pane. But when I query the DB to find a list of all available tables (using the following query), I see that the result does not contain quotation marks around the table name.
select table_schema, table_name from information_schema.tables where not table_schema='pg_catalog' and not table_schema='information_schema';
Since the table was created using quotation marks, I cannot use the table name returned from the above query immediately, because it is incorrect and generates an error published in the header.
I could try to surround the table names with quotes in all queries, but I'm not sure if it will work all the time. I am looking for a way to get a list of table names that are in quotation marks as a result.
I have the same problem with column names, but I hope that if I can find a solution to the problem with table names, a similar solution will work for column names.
source share