Kevin Wooten <kdubb@me.com> writes:
> Does anybody know if the name of a type/table in these system tables is guaranteed to be in a quotable format? Ran
intoa specific instance where the table name needs to be quoted by the driver (e.g. “user”) but want to make sure it’s
alwaysvalid to quote the name from pg_type.
AFAIK, locutions like quote_ident(pg_type.typname) should always
work, keeping in mind the possible need to schema-qualify as well.
This will often not give you what you might think is the most common
name for the type, but it will parse correctly.
regards, tom lane