MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / TimestampToInexactDTimestamp

Function TimestampToInexactDTimestamp

pkg/sql/sem/tree/eval.go:3014–3016  ·  view source on GitHub ↗

TimestampToInexactDTimestamp converts the logical timestamp into an inexact DTimestamp by dropping the logical counter and using the wall time at the microsecond precision.

(ts hlc.Timestamp)

Source from the content-addressed store, hash-verified

3012// inexact DTimestamp by dropping the logical counter and using the wall
3013// time at the microsecond precision.
3014func TimestampToInexactDTimestamp(ts hlc.Timestamp) *DTimestamp {
3015 return MakeDTimestamp(timeutil.Unix(0, ts.WallTime), time.Microsecond)
3016}
3017
3018// GetRelativeParseTime implements ParseTimeContext.
3019func (ctx *EvalContext) GetRelativeParseTime() time.Time {

Callers

nothing calls this directly

Calls 2

UnixFunction · 0.92
MakeDTimestampFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…