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

Function ParseDTimeTZ

pkg/sql/sem/tree/datum.go:2049–2056  ·  view source on GitHub ↗

ParseDTimeTZ parses and returns the *DTime Datum value represented by the provided string, or an error if parsing is unsuccessful.

(ctx ParseTimeContext, s string, precision time.Duration)

Source from the content-addressed store, hash-verified

2047// ParseDTimeTZ parses and returns the *DTime Datum value represented by the
2048// provided string, or an error if parsing is unsuccessful.
2049func ParseDTimeTZ(ctx ParseTimeContext, s string, precision time.Duration) (*DTimeTZ, error) {
2050 now := relativeParseTime(ctx)
2051 d, err := timetz.ParseTimeTZ(now, s, precision)
2052 if err != nil {
2053 return nil, err
2054 }
2055 return NewDTimeTZ(d), nil
2056}
2057
2058// ResolvedType implements the TypedExpr interface.
2059func (*DTimeTZ) ResolvedType() *types.T {

Callers 2

ParseAndRequireStringFunction · 0.85
PerformCastFunction · 0.85

Calls 3

ParseTimeTZFunction · 0.92
relativeParseTimeFunction · 0.85
NewDTimeTZFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…