Documentation ¶
Overview ¶
Package oidext contains oids that are not in `github.com/lib/pq/oid` as they are not shipped by default with postgres. As CRDB does not support extensions, we'll need to automatically assign a few OIDs of our own.
Index ¶
Constants ¶
const ( T_geometry = oid.Oid(90000) T__geometry = oid.Oid(90001) T_geography = oid.Oid(90002) T__geography = oid.Oid(90003) T_box2d = oid.Oid(90004) T__box2d = oid.Oid(90005) )
OIDs in this block are extensions of postgres, thus having no official OID.
const CockroachPredefinedOIDMax = 100000
CockroachPredefinedOIDMax defines the maximum OID allowed for use by non user defined types. OIDs for user defined types will start at CockroachPrefixedOIDMax and increase as new types are created. User defined type descriptors have a cluster-wide unique stable ID. CockroachPredefinedOIDMax defines the mapping from this stable ID to a type OID. In particular, stable ID + CockroachPredefinedOIDMax = type OID. types.StableTypeIDToOID and types.UserDefinedTypeOIDToID should be used when converting between stable ID's and type OIDs.
Variables ¶
var ExtensionTypeName = map[oid.Oid]string{ T_geometry: "GEOMETRY", T__geometry: "_GEOMETRY", T_geography: "GEOGRAPHY", T__geography: "_GEOGRAPHY", T_box2d: "BOX2D", T__box2d: "_BOX2D", }
ExtensionTypeName returns a mapping from extension oids to their type name.
Functions ¶
Types ¶
This section is empty.