↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 函数

make_timestamptz

从年、月、日、小时、分钟和秒字段并结合时区创建时间戳(负数年份表示 BC)。如果没有指定 timezone,则使用当前时区;示例假设会话时区为 Europe/London

英文手册覆盖始于 PostgreSQL 7.1. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 19·选择有来源记录的版本

group
datetime
group label
时间/日期函数和操作符
lang
en
layout
table-new
pages
functions-datetime.html
prose only
false

版本定义 PG 19

从年、月、日、小时、分钟和秒字段并结合时区创建时间戳(负数年份表示 BC)。如果没有指定 timezone,则使用当前时区;示例假设会话时区为 Europe/London
make_timestamptz ( year int, month int, mday int, hour int, min int, sec double precision [, timezone text] ) → timestamp with time zone
从年、月、日、小时、分钟和秒字段并结合时区创建时间戳(负数年份表示 BC)。如果没有指定 timezone,则使用当前时区;示例假设会话时区为 Europe/London

函数签名与重载

make_timestamptz ( year int, month int, mday int, hour int, min int, sec double precision [, timezone text] ) → timestamp with time zone → timestamp with time zone
从年、月、日、小时、分钟和秒字段并结合时区创建时间戳(负数年份表示 BC)。如果没有指定 timezone,则使用当前时区;示例假设会话时区为 Europe/London

比较版本

完整来源事实

documentation revision

{"inputs":[{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"b7a6cb5aaa8097293830b1e09beb16b975d72dbe156b9901e6f34ba0e1dd8ceb","version":"19rc2"},{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"c18874697badf3f08c76d8b4453195fcca4140306821e183775ec45771cbdee1","version":"19rc2"}],"release":"19rc2","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 19 · wiki-repair-20261023:b1b7c76433250c8ab8350558c7c871e16f373a0aa2d9cb378e0ace0d97bdac66

正文语言: zh-Hans · wiki-repair-20261023:b1b7c76433250c8ab8350558c7c871e16f373a0aa2d9cb378e0ace0d97bdac66