Operator Operations
Operation: createOperator
pgm.createOperator( operator_name, options )
IMPORTANT
Create a new operator - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_name | Name | name of the new operator |
options | object | Check below for available options |
Options
Option | Type | Description |
---|---|---|
procedure | Name | name of procedure performing operation |
left | Name | type of left argument |
right | Name | type of right argument |
commutator | Name | name of commutative operator |
negator | Name | name of negating operator |
restrict | Name | name of restriction procedure |
join | Name | name of join procedure |
hashes | boolean | adds HASHES clause |
merges | boolean | adds MERGES clause |
Reverse Operation: dropOperator
pgm.dropOperator( operator_name, drop_options )
IMPORTANT
Drop a operator - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_name | Name | name of the operator to drop |
drop_options | object | Check below for available options |
Options
Option | Type | Description |
---|---|---|
ifExists | boolean | drops schema only if it exists |
cascade | boolean | drops also dependent objects |
left | Name | type of left argument |
right | Name | type 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
Name | Type | Description |
---|---|---|
operator_class_name | Name | name of the new operator class |
type | string | data type of the new operator class |
index_method | Name | name of the index method of operator class |
operator_list | array | of operator objects |
options | object | Check below for available options |
Options
Option | Type | Description |
---|---|---|
default | boolean | adds DEFAULT clause |
family | string | type of left argument |
Reverse Operation: dropOperatorClass
pgm.dropOperatorClass( operator_class_name, index_methoddrop_options )
[IMPORTANT] Drop a operator class - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_class_name | Name | name of the operator class to drop |
index_method | Name | name of the index method of operator class |
drop_options | object | Check below for available options |
Options
Option | Type | Description |
---|---|---|
ifExists | boolean | drops schema only if it exists |
cascade | boolean | drops 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
Name | Type | Description |
---|---|---|
old_operator_class_name | Name | old name of the operator class |
index_method | Name | name of the index method of operator class |
new_operator_class_name | Name | new name of the operator class |
Operation: alterOperatorClass
pgm.createOperatorFamily( operator_family_name, index_method )
IMPORTANT
Create a new operator family - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_family_name | Name | name of the new operator family |
index_method | Name | name 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
Name | Type | Description |
---|---|---|
operator_family_name | Name | name of the operator family to drop |
index_method | Name | name of the index method of operator family |
drop_options | object | Check below for available options |
Options
Option | Type | Description |
---|---|---|
ifExists | boolean | drops schema only if it exists |
cascade | boolean | drops 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
Name | Type | Description |
---|---|---|
old_operator_family_name | Name | old name of the operator family |
index_method | Name | name of the index method of operator family |
new_operator_family_name | Name | new name of the operator family |
Operation: alterOperatorFamily
pgm.addToOperatorFamily( operator_family_name, index_method, operator_list )
IMPORTANT
Rename a operator family - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_family_name | Name | name of the operator family |
index_method | Name | name of the index method of operator family |
operator_list | array | of operator objects |
Reverse Operation: dropFromOperatorFamily
pgm.removeFromOperatorFamily( operator_family_name, index_method, operator_list )
IMPORTANT
Rename a operator family - postgres docs
Arguments
Name | Type | Description |
---|---|---|
operator_family_name | Name | name of the operator family |
index_method | Name | name of the index method of operator family |
operator_list | array | of operator objects |
Operator List Definitions
Some functions for defining operators take as parameter operator_list
which is array of objects with the following structure:
Name | Type | Description |
---|---|---|
type | string | function or operator |
number | number | index |
name | Name | name of operator or procedure |
params | array | list of argument types of operator or procedure |