Turns out that `col_is_unique()` and `col_has_constraint()` were including *all* columns in a unique or check constraint in a table as if they were all in one constraint. Of course, different columns can be in different constraints, so this wasn't right. Thanks to Cédric Villemain for the spot!
…rick is to try to quote the wanted type name like the actual type name is quoted, as much as possible. That means calling `quote_ident()` only if the actual type is quoted. The new function `_quote_ident_like()` handles this. There are a bunch of other places that likely will need to be tweaked to handle this. Might actually get rid of `display_type()` and fetch the information from the catalog, instead, so as to avoid quoting issues altogether. Still poking at it.