PostgreSQL Source Code
git master
|
Go to the source code of this file.
Variables | |
TimestampTz | PgStartTime |
TimestampTz | PgReloadTime |
#define DatumGetIntervalP | ( | X | ) | ((Interval *) DatumGetPointer(X)) |
Definition at line 29 of file timestamp.h.
Referenced by abs_interval(), check_timezone(), convert_timevalue_to_scalar(), gbt_intv_compress(), gbt_time_dist(), gbt_time_penalty(), gbt_ts_dist(), in_range_interval_interval(), interval_accum(), interval_accum_inv(), interval_avg(), interval_combine(), interval_dist(), time_dist(), timestamp_mi(), ts_dist(), and tstz_dist().
#define DatumGetTimestamp | ( | X | ) | ((Timestamp) DatumGetInt64(X)) |
Definition at line 27 of file timestamp.h.
Referenced by compareDatetime(), convert_timevalue_to_scalar(), gbt_num_compress(), generate_series_timestamp(), in_range_timestamp_interval(), JsonEncodeDateTime(), map_sql_value_to_xml_value(), and timestamp_fastcmp().
#define DatumGetTimestampTz | ( | X | ) | ((TimestampTz) DatumGetInt64(X)) |
Definition at line 28 of file timestamp.h.
Referenced by compareDatetime(), convert_timevalue_to_scalar(), gbt_tstz_compress(), generate_series_timestamptz(), get_role_password(), in_range_timestamptz_interval(), JsonEncodeDateTime(), and validateRecoveryParameters().
#define INTERVAL_FULL_PRECISION (0xFFFF) |
Definition at line 50 of file timestamp.h.
Referenced by AdjustIntervalForTypmod(), interval_support(), intervaltypmodin(), and intervaltypmodout().
#define INTERVAL_FULL_RANGE (0x7FFF) |
Definition at line 48 of file timestamp.h.
Referenced by AdjustIntervalForTypmod(), DecodeDateTime(), DecodeInterval(), DecodeTimeOnly(), interval_in(), intervaltypmodin(), intervaltypmodleastfield(), and intervaltypmodout().
#define INTERVAL_MASK | ( | b | ) | (1 << (b)) |
Definition at line 45 of file timestamp.h.
Referenced by AdjustIntervalForTypmod(), DecodeInterval(), DecodeTime(), intervaltypmodin(), intervaltypmodleastfield(), and intervaltypmodout().
#define INTERVAL_PRECISION | ( | t | ) | ((t) & INTERVAL_PRECISION_MASK) |
Definition at line 53 of file timestamp.h.
Referenced by AdjustIntervalForTypmod(), interval_support(), and intervaltypmodout().
#define INTERVAL_PRECISION_MASK (0xFFFF) |
Definition at line 51 of file timestamp.h.
#define INTERVAL_RANGE | ( | t | ) | (((t) >> 16) & INTERVAL_RANGE_MASK) |
Definition at line 54 of file timestamp.h.
Referenced by AdjustIntervalForTypmod(), interval_in(), intervaltypmodleastfield(), and intervaltypmodout().
#define INTERVAL_RANGE_MASK (0x7FFF) |
Definition at line 49 of file timestamp.h.
#define INTERVAL_TYPMOD | ( | p, | |
r | |||
) | ((((r) & INTERVAL_RANGE_MASK) << 16) | ((p) & INTERVAL_PRECISION_MASK)) |
Definition at line 52 of file timestamp.h.
Referenced by intervaltypmodin().
#define IntervalPGetDatum | ( | X | ) | PointerGetDatum(X) |
Definition at line 33 of file timestamp.h.
Referenced by abs_interval(), gbt_intveq(), gbt_intvge(), gbt_intvgt(), gbt_intvkey_cmp(), gbt_intvle(), gbt_intvlt(), in_range_date_interval(), in_range_interval_interval(), in_range_timestamp_interval(), in_range_timestamptz_interval(), interval_accum(), interval_accum_inv(), interval_avg(), interval_combine(), leftmostvalue_interval(), pg_stat_get_wal_senders(), pg_timezone_abbrevs(), pg_timezone_names(), and timestamp_mi().
#define PG_GETARG_INTERVAL_P | ( | n | ) | DatumGetIntervalP(PG_GETARG_DATUM(n)) |
Definition at line 37 of file timestamp.h.
Referenced by brin_minmax_multi_distance_interval(), date_mi_interval(), date_pl_interval(), gbt_intv_consistent(), gbt_intv_distance(), generate_series_timestamp(), generate_series_timestamptz(), in_range_date_interval(), in_range_interval_interval(), in_range_time_interval(), in_range_timestamp_interval(), in_range_timestamptz_interval(), in_range_timetz_interval(), interval_accum(), interval_accum_inv(), interval_cmp(), interval_div(), interval_eq(), interval_ge(), interval_gt(), interval_hash(), interval_hash_extended(), interval_justify_days(), interval_justify_hours(), interval_justify_interval(), interval_larger(), interval_le(), interval_lt(), interval_mi(), interval_mul(), interval_ne(), interval_out(), interval_part_common(), interval_pl(), interval_scale(), interval_send(), interval_smaller(), interval_time(), interval_to_char(), interval_trunc(), interval_um(), time_mi_interval(), time_pl_interval(), timestamp_bin(), timestamp_izone(), timestamp_mi_interval(), timestamp_pl_interval(), timestamptz_bin(), timestamptz_izone(), timestamptz_mi_interval(), timestamptz_pl_interval(), timetz_izone(), timetz_mi_interval(), and timetz_pl_interval().
#define PG_GETARG_TIMESTAMP | ( | n | ) | DatumGetTimestamp(PG_GETARG_DATUM(n)) |
Definition at line 35 of file timestamp.h.
Referenced by brin_minmax_multi_distance_timestamp(), date_cmp_timestamp(), date_eq_timestamp(), date_ge_timestamp(), date_gt_timestamp(), date_le_timestamp(), date_lt_timestamp(), date_ne_timestamp(), gbt_ts_consistent(), gbt_ts_distance(), generate_series_timestamp(), in_range_timestamp_interval(), timestamp_age(), timestamp_bin(), timestamp_cmp(), timestamp_cmp_date(), timestamp_cmp_timestamptz(), timestamp_date(), timestamp_eq(), timestamp_eq_date(), timestamp_eq_timestamptz(), timestamp_finite(), timestamp_ge(), timestamp_ge_date(), timestamp_ge_timestamptz(), timestamp_gt(), timestamp_gt_date(), timestamp_gt_timestamptz(), timestamp_izone(), timestamp_larger(), timestamp_le(), timestamp_le_date(), timestamp_le_timestamptz(), timestamp_lt(), timestamp_lt_date(), timestamp_lt_timestamptz(), timestamp_mi(), timestamp_mi_interval(), timestamp_ne(), timestamp_ne_date(), timestamp_ne_timestamptz(), timestamp_out(), timestamp_part_common(), timestamp_pl_interval(), timestamp_scale(), timestamp_send(), timestamp_smaller(), timestamp_time(), timestamp_timestamptz(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz_cmp_timestamp(), timestamptz_date(), timestamptz_eq_timestamp(), timestamptz_ge_timestamp(), timestamptz_gt_timestamp(), timestamptz_le_timestamp(), timestamptz_lt_timestamp(), timestamptz_ne_timestamp(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), ts_dist(), tsrange_subdiff(), and tstzrange_subdiff().
#define PG_GETARG_TIMESTAMPTZ | ( | n | ) | DatumGetTimestampTz(PG_GETARG_DATUM(n)) |
Definition at line 36 of file timestamp.h.
Referenced by date_cmp_timestamptz(), date_eq_timestamptz(), date_ge_timestamptz(), date_gt_timestamptz(), date_le_timestamptz(), date_lt_timestamptz(), date_ne_timestamptz(), gbt_tstz_consistent(), gbt_tstz_distance(), generate_series_timestamptz(), in_range_timestamptz_interval(), pg_replication_origin_xact_setup(), timestamp_cmp_timestamptz(), timestamp_eq_timestamptz(), timestamp_ge_timestamptz(), timestamp_gt_timestamptz(), timestamp_le_timestamptz(), timestamp_lt_timestamptz(), timestamp_ne_timestamptz(), timestamptz_age(), timestamptz_bin(), timestamptz_cmp_date(), timestamptz_cmp_timestamp(), timestamptz_eq_date(), timestamptz_eq_timestamp(), timestamptz_ge_date(), timestamptz_ge_timestamp(), timestamptz_gt_date(), timestamptz_gt_timestamp(), timestamptz_izone(), timestamptz_le_date(), timestamptz_le_timestamp(), timestamptz_lt_date(), timestamptz_lt_timestamp(), timestamptz_mi_interval(), timestamptz_ne_date(), timestamptz_ne_timestamp(), timestamptz_out(), timestamptz_part_common(), timestamptz_pl_interval(), timestamptz_scale(), timestamptz_send(), timestamptz_timestamp(), timestamptz_trunc(), timestamptz_trunc_zone(), timestamptz_zone(), and tstz_dist().
#define PG_RETURN_INTERVAL_P | ( | x | ) | return IntervalPGetDatum(x) |
Definition at line 41 of file timestamp.h.
Referenced by interval_dist(), interval_div(), interval_in(), interval_justify_days(), interval_justify_hours(), interval_justify_interval(), interval_larger(), interval_mi(), interval_mul(), interval_pl(), interval_recv(), interval_scale(), interval_smaller(), interval_trunc(), interval_um(), make_interval(), time_dist(), time_interval(), time_mi_time(), timestamp_age(), timestamp_mi(), timestamptz_age(), ts_dist(), and tstz_dist().
#define PG_RETURN_TIMESTAMP | ( | x | ) | return TimestampGetDatum(x) |
Definition at line 39 of file timestamp.h.
Referenced by date_timestamp(), date_timestamptz(), datetime_timestamp(), datetimetz_timestamptz(), float8_timestamptz(), make_timestamp(), timestamp_bin(), timestamp_in(), timestamp_larger(), timestamp_pl_interval(), timestamp_recv(), timestamp_scale(), timestamp_smaller(), timestamp_trunc(), timestamptz_izone(), timestamptz_pl_interval(), timestamptz_timestamp(), timestamptz_trunc_zone(), timestamptz_zone(), and to_timestamp().
#define PG_RETURN_TIMESTAMPTZ | ( | x | ) | return TimestampTzGetDatum(x) |
Definition at line 40 of file timestamp.h.
Referenced by clock_timestamp(), make_timestamptz(), make_timestamptz_at_timezone(), now(), pg_conf_load_time(), pg_last_xact_replay_timestamp(), pg_postmaster_start_time(), pg_stat_get_backend_activity_start(), pg_stat_get_backend_start(), pg_stat_get_backend_xact_start(), pg_stat_get_bgwriter_stat_reset_time(), pg_stat_get_db_checksum_last_failure(), pg_stat_get_db_stat_reset_time(), pg_stat_get_last_analyze_time(), pg_stat_get_last_autoanalyze_time(), pg_stat_get_last_autovacuum_time(), pg_stat_get_last_vacuum_time(), pg_stat_get_snapshot_timestamp(), pg_xact_commit_timestamp(), statement_timestamp(), timestamp_izone(), timestamp_timestamptz(), timestamp_zone(), timestamptz_bin(), timestamptz_in(), timestamptz_recv(), timestamptz_scale(), timestamptz_trunc(), and timestamptz_trunc_zone().
#define TIMESTAMP_MASK | ( | b | ) | (1 << (b)) |
Definition at line 44 of file timestamp.h.
#define TimestampGetDatum | ( | X | ) | Int64GetDatum(X) |
Definition at line 31 of file timestamp.h.
Referenced by date_mi_interval(), date_pl_interval(), ExecEvalSQLValueFunction(), gbt_num_fetch(), generate_series_timestamp(), in_range_date_interval(), in_range_timestamp_interval(), leftmostvalue_timestamp(), parse_datetime(), timestamp_mi_interval(), and timestamptz_mi_interval().
#define timestamptz_cmp_internal | ( | dt1, | |
dt2 | |||
) | timestamp_cmp_internal(dt1, dt2) |
Definition at line 100 of file timestamp.h.
Referenced by date_cmp_timestamptz_internal(), and timestamp_cmp_timestamptz_internal().
#define TimestampTzGetDatum | ( | X | ) | Int64GetDatum(X) |
Definition at line 32 of file timestamp.h.
Referenced by ExecEvalSQLValueFunction(), generate_series_timestamptz(), in_range_timestamptz_interval(), MakeOldSnapshotTimeMappingTuple(), parse_datetime(), pg_control_checkpoint(), pg_control_system(), pg_cursor(), pg_last_committed_xact(), pg_lock_status(), pg_ls_dir_files(), pg_prepared_statement(), pg_prepared_xact(), pg_stat_file(), pg_stat_get_activity(), pg_stat_get_archiver(), pg_stat_get_prefetch_recovery(), pg_stat_get_replication_slots(), pg_stat_get_slru(), pg_stat_get_subscription(), pg_stat_get_wal(), pg_stat_get_wal_receiver(), pg_stat_get_wal_senders(), pg_stat_statements_info(), and pg_xact_commit_timestamp_origin().
#define TimestampTzPlusMilliseconds | ( | tz, | |
ms | |||
) | ((tz) + ((ms) * (int64) 1000)) |
Definition at line 56 of file timestamp.h.
Referenced by autoprewarm_main(), backend_read_statsfile(), BackgroundWriterMain(), DetermineSleepTime(), enable_timeout_after(), enable_timeouts(), GetStandbyLimitTime(), launch_worker(), LogicalRepApplyLoop(), MakeOldSnapshotTimeMappingTuple(), pgfdw_cancel_query(), pgfdw_exec_cleanup_query(), rebuild_database_list(), recoveryApplyDelay(), WalReceiverMain(), WalSndCheckTimeOut(), WalSndComputeSleeptime(), WalSndKeepaliveIfNecessary(), and WalSndWriteData().
Definition at line 104 of file timestamp.c.
References ereport, errcode(), errmsg(), ERROR, MAX_TIMESTAMP_PRECISION, and WARNING.
Referenced by anytimestamp_typmodin(), and transformSQLValueFunction().
int date2isoweek | ( | int | year, |
int | mon, | ||
int | mday | ||
) |
Definition at line 4422 of file timestamp.c.
References date2j(), and j2day().
Referenced by DCH_to_char(), extract_date(), timestamp_part_common(), timestamp_trunc(), timestamptz_part_common(), and timestamptz_trunc_internal().
int date2isoyear | ( | int | year, |
int | mon, | ||
int | mday | ||
) |
Definition at line 4477 of file timestamp.c.
References date2j(), and j2day().
Referenced by date2isoyearday(), DCH_to_char(), extract_date(), timestamp_part_common(), and timestamptz_part_common().
int date2isoyearday | ( | int | year, |
int | mon, | ||
int | mday | ||
) |
Definition at line 4534 of file timestamp.c.
References date2isoyear(), date2j(), and isoweek2j().
Referenced by DCH_to_char().
Definition at line 1795 of file timestamp.c.
References USECS_PER_HOUR, USECS_PER_MINUTE, and USECS_PER_SEC.
Referenced by DecodeDateTime(), DecodeTimeOnly(), and timestamp2tm().
TimestampTz GetCurrentTimestamp | ( | void | ) |
Definition at line 1580 of file timestamp.c.
References gettimeofday(), POSTGRES_EPOCH_JDATE, SECS_PER_DAY, UNIX_EPOCH_JDATE, and USECS_PER_SEC.
Referenced by ApplyLauncherMain(), ApplyWorkerMain(), asyncQueueFillWarning(), autoprewarm_main(), autovac_refresh_stats(), AutoVacLauncherMain(), backend_read_statsfile(), BackgroundWriterMain(), check_log_duration(), CheckPointGuts(), CleanupBackgroundWorker(), clock_timestamp(), CreateCheckPoint(), CreateEndOfRecoveryRecord(), CreateRestartPoint(), DetermineSleepTime(), disable_timeout(), disable_timeouts(), do_analyze_rel(), do_start_bgworker(), do_start_worker(), drandom(), enable_timeout_after(), enable_timeout_at(), enable_timeouts(), entry_reset(), get_role_password(), GetCurrentTransactionStopTimestamp(), GetReplicationApplyDelay(), GetSnapshotCurrentTimestamp(), handle_sig_alarm(), heap_vacuum_rel(), InitProcessGlobals(), launcher_determine_sleep(), LockBufferForCleanup(), log_disconnections(), LogCheckpointEnd(), logicalrep_worker_launch(), LogicalRepApplyLoop(), maybe_start_bgworkers(), perform_base_backup(), pgfdw_cancel_query(), pgfdw_exec_cleanup_query(), pgfdw_get_cleanup_result(), pgss_shmem_startup(), pgstat_read_statsfiles(), pgstat_recv_inquiry(), pgstat_recv_resetreplslotcounter(), pgstat_recv_resetsharedcounter(), pgstat_recv_resetsinglecounter(), pgstat_recv_resetslrucounter(), pgstat_report_activity(), pgstat_report_analyze(), pgstat_report_autovac(), pgstat_report_checksum_failures_in_db(), pgstat_report_vacuum(), pgstat_send_archiver(), pgstat_send_connstats(), pgstat_send_wal(), pgstat_write_statsfiles(), PostgresMain(), PostmasterMain(), PrepareTransaction(), process_syncing_tables_for_apply(), ProcessRepliesIfAny(), ProcessStandbyReplyMessage(), ProcessWalSndrMessage(), ProcSleep(), rebuild_database_list(), RecordTransactionAbort(), RecordTransactionAbortPrepared(), RecordTransactionCommitPrepared(), recoveryApplyDelay(), reschedule_timeouts(), reset_dbentry_counters(), ResolveRecoveryConflictWithBufferPin(), ResolveRecoveryConflictWithLock(), ResolveRecoveryConflictWithVirtualXIDs(), send_feedback(), SetCurrentStatementStartTimestamp(), SetCurrentTransactionStopTimestamp(), StartTransaction(), StartupXLOG(), test_pattern(), throttle(), UpdateWorkerStats(), WaitExceedsMaxStandbyDelay(), WaitForWALToBecomeAvailable(), WalReceiverMain(), WalSndKeepalive(), WalSndLoop(), WalSndUpdateProgress(), WalSndWaitForWal(), WalSndWriteData(), XLogBackgroundFlush(), XLogFileRead(), XLogPrefetchResetStats(), XLogPrefetchShmemInit(), XLogRestorePoint(), XLogSendPhysical(), XLogWalRcvSendHSFeedback(), and XLogWalRcvSendReply().
void GetEpochTime | ( | struct pg_tm * | tm | ) |
Definition at line 2048 of file timestamp.c.
References elog, epoch, ERROR, pg_gmtime(), pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, and pg_tm::tm_year.
Referenced by date_in(), PGTYPESdate_from_asc(), and SetEpochTimestamp().
TimestampTz GetSQLCurrentTimestamp | ( | int32 | typmod | ) |
Definition at line 1598 of file timestamp.c.
References AdjustTimestampForTypmod(), and GetCurrentTransactionStartTimestamp().
Referenced by ExecEvalSQLValueFunction().
Definition at line 1612 of file timestamp.c.
References AdjustTimestampForTypmod(), GetCurrentTransactionStartTimestamp(), and timestamptz2timestamp().
Referenced by ExecEvalSQLValueFunction().
Definition at line 1966 of file timestamp.c.
References Interval::day, ereport, errcode(), errmsg(), ERROR, Interval::month, MONTHS_PER_YEAR, SAMESIGN, Interval::time, pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_year, USECS_PER_HOUR, USECS_PER_MINUTE, and USECS_PER_SEC.
Referenced by interval_out(), interval_part_common(), interval_to_char(), and interval_trunc().
void isoweek2date | ( | int | woy, |
int * | year, | ||
int * | mon, | ||
int * | mday | ||
) |
Definition at line 4391 of file timestamp.c.
References isoweek2j(), and j2date().
Referenced by do_to_timestamp(), timestamp_trunc(), and timestamptz_trunc_internal().
int isoweek2j | ( | int | year, |
int | week | ||
) |
Definition at line 4371 of file timestamp.c.
References date2j(), and j2day().
Referenced by date2isoyearday(), do_to_timestamp(), isoweek2date(), and isoweekdate2date().
void isoweekdate2date | ( | int | isoweek, |
int | wday, | ||
int * | year, | ||
int * | mon, | ||
int * | mday | ||
) |
Definition at line 4404 of file timestamp.c.
References isoweek2j(), and j2date().
Referenced by do_to_timestamp().
Timestamp SetEpochTimestamp | ( | void | ) |
Definition at line 2070 of file timestamp.c.
References GetEpochTime(), tm, and tm2timestamp().
Referenced by dttofmtasc_replace(), PGTYPEStimestamp_from_asc(), timestamp_in(), timestamp_part_common(), timestamptz_in(), and timestamptz_part_common().
TimestampTz time_t_to_timestamptz | ( | pg_time_t | tm | ) |
Definition at line 1732 of file timestamp.c.
References POSTGRES_EPOCH_JDATE, SECS_PER_DAY, UNIX_EPOCH_JDATE, and USECS_PER_SEC.
Referenced by pg_control_checkpoint(), pg_control_system(), pg_ls_dir_files(), and pg_stat_file().
TimestampTz timestamp2timestamptz_opt_overflow | ( | Timestamp | timestamp, |
int * | overflow | ||
) |
Definition at line 5511 of file timestamp.c.
References DetermineTimeZoneOffset(), dt2local(), ereport, errcode(), errmsg(), ERROR, IS_VALID_TIMESTAMP, MIN_TIMESTAMP, session_timezone, timestamp2tm(), TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, TIMESTAMP_NOT_FINITE, and tm.
Referenced by timestamp2timestamptz(), and timestamp_cmp_timestamptz_internal().
int timestamp2tm | ( | Timestamp | dt, |
int * | tzp, | ||
struct pg_tm * | tm, | ||
fsec_t * | fsec, | ||
const char ** | tzn, | ||
pg_tz * | attimezone | ||
) |
Definition at line 1822 of file timestamp.c.
References dt2time(), j2date(), pg_localtime(), POSTGRES_EPOCH_JDATE, SECS_PER_DAY, session_timezone, pg_tm::tm_gmtoff, pg_tm::tm_hour, pg_tm::tm_isdst, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_year, pg_tm::tm_zone, TMODULO, UNIX_EPOCH_JDATE, USECS_PER_DAY, and USECS_PER_SEC.
Referenced by DetermineTimeZoneAbbrevOffsetTS(), GetCurrentTimeUsec(), JsonEncodeDateTime(), make_timestamptz_at_timezone(), map_sql_value_to_xml_value(), pg_timezone_names(), PGTYPEStimestamp_add_interval(), PGTYPEStimestamp_fmt_asc(), PGTYPEStimestamp_to_asc(), timestamp2timestamptz_opt_overflow(), timestamp_age(), timestamp_date(), timestamp_out(), timestamp_part_common(), timestamp_pl_interval(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2timestamp(), timestamptz_age(), timestamptz_date(), timestamptz_out(), timestamptz_part_common(), timestamptz_pl_interval(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_to_str(), timestamptz_trunc_internal(), and timestamptz_zone().
Definition at line 2090 of file timestamp.c.
Referenced by date_cmp_timestamp_internal(), generate_series_timestamp(), generate_series_timestamptz(), timestamp_cmp(), timestamp_eq(), timestamp_fastcmp(), timestamp_ge(), timestamp_gt(), timestamp_larger(), timestamp_le(), timestamp_lt(), timestamp_ne(), and timestamp_smaller().
int32 timestamp_cmp_timestamptz_internal | ( | Timestamp | timestampVal, |
TimestampTz | dt2 | ||
) |
Definition at line 2194 of file timestamp.c.
References timestamp2timestamptz_opt_overflow(), TIMESTAMP_IS_NOBEGIN, TIMESTAMP_IS_NOEND, and timestamptz_cmp_internal.
Referenced by cmpTimestampToTimestampTz(), timestamp_cmp_timestamptz(), timestamp_eq_timestamptz(), timestamp_ge_timestamptz(), timestamp_gt_timestamptz(), timestamp_le_timestamptz(), timestamp_lt_timestamptz(), timestamp_ne_timestamptz(), timestamptz_cmp_timestamp(), timestamptz_eq_timestamp(), timestamptz_ge_timestamp(), timestamptz_gt_timestamp(), timestamptz_le_timestamp(), timestamptz_lt_timestamp(), and timestamptz_ne_timestamp().
void TimestampDifference | ( | TimestampTz | start_time, |
TimestampTz | stop_time, | ||
long * | secs, | ||
int * | microsecs | ||
) |
Definition at line 1656 of file timestamp.c.
References start_time, and USECS_PER_SEC.
Referenced by check_log_duration(), DetermineSleepTime(), heap_vacuum_rel(), launcher_determine_sleep(), log_disconnections(), LogRecoveryConflict(), pgstat_report_activity(), pgstat_send_connstats(), ProcSleep(), and schedule_alarm().
bool TimestampDifferenceExceeds | ( | TimestampTz | start_time, |
TimestampTz | stop_time, | ||
int | msec | ||
) |
Definition at line 1711 of file timestamp.c.
References start_time.
Referenced by ApplyLauncherMain(), asyncQueueFillWarning(), autovac_refresh_stats(), AutoVacLauncherMain(), do_analyze_rel(), do_start_worker(), heap_vacuum_rel(), LockBufferForCleanup(), logicalrep_worker_launch(), maybe_start_bgworkers(), pgstat_report_stat(), pgstat_send_wal(), process_syncing_tables_for_apply(), ProcSleep(), ResolveRecoveryConflictWithVirtualXIDs(), send_feedback(), WaitForWALToBecomeAvailable(), WalSndUpdateProgress(), XLogBackgroundFlush(), XLogWalRcvSendHSFeedback(), and XLogWalRcvSendReply().
long TimestampDifferenceMilliseconds | ( | TimestampTz | start_time, |
TimestampTz | stop_time | ||
) |
Definition at line 1693 of file timestamp.c.
References start_time.
Referenced by autoprewarm_main(), do_analyze_rel(), GetReplicationApplyDelay(), GetReplicationTransferLatency(), LogCheckpointEnd(), pgfdw_get_cleanup_result(), recoveryApplyDelay(), WaitForWALToBecomeAvailable(), and WalSndComputeSleeptime().
bool TimestampTimestampTzRequiresRewrite | ( | void | ) |
Definition at line 5480 of file timestamp.c.
References pg_get_timezone_offset(), and session_timezone.
Referenced by ATColumnChangeRequiresRewrite().
const char* timestamptz_to_str | ( | TimestampTz | t | ) |
Definition at line 1774 of file timestamp.c.
References buf, EncodeDateTime(), EncodeSpecialTimestamp(), MAXDATELEN, snprintf, strlcpy(), timestamp2tm(), TIMESTAMP_NOT_FINITE, timestamptz_to_time_t(), tm, USE_ISO_DATES, and USECS_PER_SEC.
Referenced by backend_read_statsfile(), CreateRestartPoint(), pg_decode_commit_prepared_txn(), pg_decode_commit_txn(), pg_decode_prepare_txn(), pg_decode_rollback_prepared_txn(), pg_decode_stream_commit(), pg_decode_stream_prepare(), pgstat_recv_inquiry(), ProcessStandbyHSFeedbackMessage(), ProcessStandbyReplyMessage(), ProcessWalSndrMessage(), recoveryStopsAfter(), recoveryStopsBefore(), StartupXLOG(), xact_desc_abort(), xact_desc_commit(), xact_desc_prepare(), and xlog_desc().
pg_time_t timestamptz_to_time_t | ( | TimestampTz | t | ) |
Definition at line 1754 of file timestamp.c.
References POSTGRES_EPOCH_JDATE, SECS_PER_DAY, UNIX_EPOCH_JDATE, and USECS_PER_SEC.
Referenced by DetermineTimeZoneAbbrevOffsetTS(), InitProcessGlobals(), and timestamptz_to_str().
Definition at line 1994 of file timestamp.c.
References Interval::day, Interval::month, MONTHS_PER_YEAR, Interval::time, pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_year, and USECS_PER_SEC.
Referenced by interval_in(), interval_trunc(), pg_timezone_abbrevs(), pg_timezone_names(), timestamp_age(), and timestamptz_age().
Definition at line 1918 of file timestamp.c.
References date2j(), dt2local(), IS_VALID_JULIAN, IS_VALID_TIMESTAMP, POSTGRES_EPOCH_JDATE, time2t(), pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_year, and USECS_PER_DAY.
Referenced by check_recovery_target_time(), parse_datetime(), PGTYPEStimestamp_add_interval(), PGTYPEStimestamp_current(), PGTYPEStimestamp_defmt_scan(), PGTYPEStimestamp_from_asc(), SetEpochTimestamp(), timestamp_in(), timestamp_pl_interval(), timestamp_trunc(), timestamp_zone(), timestamptz2timestamp(), timestamptz_in(), timestamptz_pl_interval(), timestamptz_trunc_internal(), timestamptz_zone(), and to_timestamp().
TimestampTz PgReloadTime |
Definition at line 55 of file timestamp.c.
Referenced by pg_conf_load_time(), and PostmasterMarkPIDForWorkerNotify().
TimestampTz PgStartTime |
Definition at line 52 of file timestamp.c.
Referenced by pg_postmaster_start_time(), PostgresMain(), PostmasterMain(), and PostmasterMarkPIDForWorkerNotify().