In my postgres logs, I'm getting a notification every few seconds saying "sql_error_code = 42622". Apparently, this means an identifier is too long. The identifier is unfamiliar to me, so I'm trying to figure out where it's coming from. To track this down, I'd like to look for any identifier in the database (the query doesn't need to have a where clause).
I believe that means I need a query to see every:
- Schema name
- Tablename
- Column name
- Index name
- Foreign key name
- And anything else I could be missing that could be considered an identifier.
I could pull this off by using the information_schema to make a massive, multi-query union to get this information, but it would take a lot of time to write that. Is there a faster way to search any identifier?