oidext

package
v0.23.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 1 module, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

View Source
const CockroachPredefinedOIDMax = 100000

CockroachPredefinedOIDMax defines the maximum OID allowed for use by non user defined types/functions. OIDs for user defined types/functions will start at CockroachPrefixedOIDMax and increase as new types are created. User defined type/function descriptors have a cluster-wide unique stable ID. CockroachPredefinedOIDMax defines the mapping from this stable ID to a type/function OID. In particular, stable ID + CockroachPredefinedOIDMax = type OID. types.StableTypeIDToOID and types.UserDefinedTypeOIDToID should be used when converting between stable ID's and type/function OIDs.

Variables

View Source
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

func TypeName

func TypeName(o oid.Oid) (string, bool)

TypeName checks the name for a given type by first looking up oid.TypeName before falling back to looking at the oid extension ExtensionTypeName.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL