I\'m having this strange problem using PostgreSQL 9.3 with tables that are created using qoutes. For instance, if I create a table using qoutes:
create table \"T
A string function used to suitably quote identifiers in an SQL statement string is quote_ident(), which references a good example (used in conjunction with related quote_literal()
).
To use your example, and mix in other results:
select
quote_ident(table_schema) as table_schema,
quote_ident(table_name) as table_name
...
table_schema | table_name
--------------+------------------
...
public | good_name
public | "table"
public | some_table
public | "something else"
public | "Tom's work"
public | "TEST"
...