MCPcopy Create free account
hub / github.com/dolthub/doltgresql / initBinaryDivide

Function initBinaryDivide

server/functions/binary/divide.go:34–50  ·  view source on GitHub ↗

These functions can be gathered using the following query from a Postgres 15 instance: SELECT * FROM pg_operator o WHERE o.oprname = '/' ORDER BY o.oprcode::varchar; initBinaryDivide registers the functions to the catalog.

()

Source from the content-addressed store, hash-verified

32
33// initBinaryDivide registers the functions to the catalog.
34func initBinaryDivide() {
35 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, float4div)
36 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, float48div)
37 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, float8div)
38 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, float84div)
39 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int2div)
40 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int24div)
41 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int28div)
42 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int4div)
43 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int42div)
44 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int48div)
45 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int8div)
46 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int82div)
47 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, int84div)
48 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, interval_div)
49 framework.RegisterBinaryFunction(framework.Operator_BinaryDivide, numeric_div)
50}
51
52// float4div_callable is the callable logic for the float4div function.
53func float4div_callable(ctx *sql.Context, _ [3]*pgtypes.DoltgresType, val1 any, val2 any) (any, error) {

Callers 1

InitFunction · 0.85

Calls 1

RegisterBinaryFunctionFunction · 0.92

Tested by

no test coverage detected