InformationSchemaName returns the string suitable to populate the data_type column of information_schema.columns. This is different from SQLString() in that it must report SQL standard names that are compatible with PostgreSQL client expectations.
()
| 1961 | // This is different from SQLString() in that it must report SQL standard names |
| 1962 | // that are compatible with PostgreSQL client expectations. |
| 1963 | func (t *T) InformationSchemaName() string { |
| 1964 | // This is the same as SQLStandardName, except for the case of arrays. |
| 1965 | if t.Family() == ArrayFamily { |
| 1966 | return "ARRAY" |
| 1967 | } |
| 1968 | // TypeMeta attributes are populated only when it is user defined type. |
| 1969 | if t.TypeMeta.Name != nil { |
| 1970 | return "USER-DEFINED" |
| 1971 | } |
| 1972 | return t.SQLStandardName() |
| 1973 | } |
| 1974 | |
| 1975 | // SQLString returns the CockroachDB native SQL string that can be used to |
| 1976 | // reproduce the type via parsing the string as a type. It is used in error |
nothing calls this directly
no test coverage detected