Skip to content

Operator Operations

Operation: createOperator

pgm.createOperator( operator_name, options )

IMPORTANT

Create a new operator - postgres docs

Arguments

NameTypeDescription
operator_nameNamename of the new operator
optionsobjectCheck below for available options

Options

OptionTypeDescription
procedureNamename of procedure performing operation
leftNametype of left argument
rightNametype of right argument
commutatorNamename of commutative operator
negatorNamename of negating operator
restrictNamename of restriction procedure
joinNamename of join procedure
hashesbooleanadds HASHES clause
mergesbooleanadds MERGES clause

Reverse Operation: dropOperator

pgm.dropOperator( operator_name, drop_options )

IMPORTANT

Drop a operator - postgres docs

Arguments

NameTypeDescription
operator_nameNamename of the operator to drop
drop_optionsobjectCheck below for available options

Options

OptionTypeDescription
ifExistsbooleandrops schema only if it exists
cascadebooleandrops also dependent objects
leftNametype of left argument
rightNametype of right argument

Operation: renameOperator

pgm.createOperatorClass( operator_class_name, type, index_method, operator_list, options )

IMPORTANT

Create a new operator class - postgres docs

Arguments

NameTypeDescription
operator_class_nameNamename of the new operator class
typestringdata type of the new operator class
index_methodNamename of the index method of operator class
operator_listarrayof operator objects
optionsobjectCheck below for available options

Options

OptionTypeDescription
defaultbooleanadds DEFAULT clause
familystringtype of left argument

Reverse Operation: dropOperatorClass

pgm.dropOperatorClass( operator_class_name, index_methoddrop_options )

[IMPORTANT] Drop a operator class - postgres docs

Arguments

NameTypeDescription
operator_class_nameNamename of the operator class to drop
index_methodNamename of the index method of operator class
drop_optionsobjectCheck below for available options

Options

OptionTypeDescription
ifExistsbooleandrops schema only if it exists
cascadebooleandrops also dependent objects

Operation: renameOperatorClass

pgm.renameOperatorClass( old_operator_class_name, index_method, new_operator_class_name )

IMPORTANT

Rename a operator class - postgres docs

Arguments

NameTypeDescription
old_operator_class_nameNameold name of the operator class
index_methodNamename of the index method of operator class
new_operator_class_nameNamenew name of the operator class

Operation: alterOperatorClass

pgm.createOperatorFamily( operator_family_name, index_method )

IMPORTANT

Create a new operator family - postgres docs

Arguments

NameTypeDescription
operator_family_nameNamename of the new operator family
index_methodNamename of the index method of operator family

Reverse Operation: dropOperatorFamily

pgm.dropOperatorFamily( operator_family_name, index_methoddrop_options )

IMPORTANT

Drop a operator family - postgres docs

Arguments

NameTypeDescription
operator_family_nameNamename of the operator family to drop
index_methodNamename of the index method of operator family
drop_optionsobjectCheck below for available options

Options

OptionTypeDescription
ifExistsbooleandrops schema only if it exists
cascadebooleandrops also dependent objects

Operation: renameOperatorFamily

pgm.renameOperatorFamily( old_operator_family_name, index_method, new_operator_family_name )

IMPORTANT

Rename a operator family - postgres docs

Arguments

NameTypeDescription
old_operator_family_nameNameold name of the operator family
index_methodNamename of the index method of operator family
new_operator_family_nameNamenew name of the operator family

Operation: alterOperatorFamily

pgm.addToOperatorFamily( operator_family_name, index_method, operator_list )

IMPORTANT

Rename a operator family - postgres docs

Arguments

NameTypeDescription
operator_family_nameNamename of the operator family
index_methodNamename of the index method of operator family
operator_listarrayof operator objects

Reverse Operation: dropFromOperatorFamily

pgm.removeFromOperatorFamily( operator_family_name, index_method, operator_list )

IMPORTANT

Rename a operator family - postgres docs

Arguments

NameTypeDescription
operator_family_nameNamename of the operator family
index_methodNamename of the index method of operator family
operator_listarrayof operator objects

Operator List Definitions

Some functions for defining operators take as parameter operator_list which is array of objects with the following structure:

NameTypeDescription
typestringfunction or operator
numbernumberindex
nameNamename of operator or procedure
paramsarraylist of argument types of operator or procedure