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

Method GetStmtTimestamp

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

GetStmtTimestamp retrieves the current statement timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.

()

Source from the content-addressed store, hash-verified

2960// GetStmtTimestamp retrieves the current statement timestamp as per
2961// the evaluation context. The timestamp is guaranteed to be nonzero.
2962func (ctx *EvalContext) GetStmtTimestamp() time.Time {
2963 // TODO(knz): a zero timestamp should never be read, even during
2964 // Prepare. This will need to be addressed.
2965 if !ctx.PrepareOnly && ctx.StmtTimestamp.IsZero() {
2966 panic(errors.AssertionFailedf("zero statement timestamp in EvalContext"))
2967 }
2968 return ctx.StmtTimestamp
2969}
2970//
2971//// GetClusterTimestamp retrieves the current cluster timestamp as per
2972//// the evaluation context. The timestamp is guaranteed to be nonzero.

Callers 1

EvalAsOfTimestampFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected