MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / CheckArrayElementType

Function CheckArrayElementType

pkg/sql/types/types.go:1974–1980  ·  view source on GitHub ↗

CheckArrayElementType ensures that the given type can be used as the element type of an ArrayFamily-typed column. If not, it returns an error.

(t *T)

Source from the content-addressed store, hash-verified

1972// CheckArrayElementType ensures that the given type can be used as the element
1973// type of an ArrayFamily-typed column. If not, it returns an error.
1974func CheckArrayElementType(t *T) error {
1975 if ok, issueNum := IsValidArrayElementType(t); !ok {
1976 return unimplemented.NewWithIssueDetailf(issueNum, t.String(),
1977 "arrays of %s not allowed", t)
1978 }
1979 return nil
1980}
1981
1982// IsDateTimeType returns true if the given type is a date or time-related type.
1983func IsDateTimeType(t *T) bool {

Callers 2

arrayOfFunction · 0.92
arrayOfTypeFunction · 0.92

Calls 3

NewWithIssueDetailfFunction · 0.92
IsValidArrayElementTypeFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…