Module epgsql_codec_datetime

Codec for time, timetz, date, timestamp, timestamptz, interval

Behaviours: epgsql_codec.

Description

Codec for time, timetz, date, timestamp, timestamptz, interval

It supports both integer and float datetime representations (see https://www.postgresql.org/docs/current/runtime-config-preset.html#GUC-INTEGER-DATETIMES). But float representation support might be eventually removed.

Data Types

data()

data() = pg_date() | pg_time() | pg_datetime() | pg_interval() | pg_timetz()

pg_date()

pg_date() = {Year::-4712..294276, Month::1..12, Day::1..31}

pg_datetime()

pg_datetime() = {pg_date(), pg_time()}

pg_interval()

pg_interval() = {pg_time(), Days::integer(), Months::integer()}

pg_time()

pg_time() = {Hour::0..24, Minute::0..59, Second::0..59 | float()}

pg_timetz()

pg_timetz() = {pg_time(), UtcOffset::integer()}

Function Index

decode/3
decode_text/3
encode/3
init/2
names/0

Function Details

decode/3

decode(Bin, Type, X3) -> any()

decode_text/3

decode_text(V, X2, X3) -> any()

encode/3

encode(Val, Type, X3) -> any()

init/2

init(X1, Sock) -> any()

names/0

names() -> any()


Generated by EDoc