{"Entry":{"collection":"func","key":"age","name":"age","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"7.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"10"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"7d63dceaaf7589fb3fb0e5aeb51f801e2f8456b23684af67b882855133de617a","derived_content_hash":"2a0d2ba325585f82e584dea74931cb6c714a6fd1cb970caf8ff2367cf2d56a1e","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:290b1f8ee4bd23832970ecf498684ff096abc0a51a56bf89e838dfce5af835c9","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.1","group":"datetime","group_label":"Date/Time Functions And Operators","groups":["datetime","info"],"imported_at":"2026-09-27T17:57:28.50539+08:00","last_version":"20","name":"age","name_key":"age","position":8000,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:111784acafd03c2f2943ed216bd8d3b89b05822d737318d42c7adc0dc755dc02","receipt_sha256":"896a1e41fd917bb9d8fbec1abbdbefaf300583988febf72ec89f8ddbf4570a75","repair":"wiki-repair-20261023"},"signature":"age ( timestamp, timestamp ) → interval","signature_count":3,"slug":"age","source_rev":"wiki-repair-20261023:290b1f8ee4bd23832970ecf498684ff096abc0a51a56bf89e838dfce5af835c9","summary":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","summary_zh":""}},"Definition":{"Collection":"func","Key":"age","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"age","SourceRevision":"wiki-repair-20261023:290b1f8ee4bd23832970ecf498684ff096abc0a51a56bf89e838dfce5af835c9","Facts":{"description":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","description_html":"Subtract arguments, producing a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","description_zh":"将两个参数相减，生成一个使用年和月而不是只用日的“符号化”结果","description_zh_html":"将两个参数相减，生成一个使用年和月而不是只用日的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e符号化\u003c/span\u003e”\u003c/span\u003e结果","doc":{"anchor":"FUNCTIONS-DATETIME-TABLE","file":"functions-datetime.html","sha256":"8c5053713aeaacfbe4cb00effc61f10d457c98b2a29c724b10b93819a087ea95","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"8c5053713aeaacfbe4cb00effc61f10d457c98b2a29c724b10b93819a087ea95","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","version":"18.7"},{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"c3efdd1c3df6795c73dfea2ecec17ca31ff37da23d758083a581d75445851f0c","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"f9684137c0b9fb17a691c4d905529d114472a507a007c15058f2703962b611d2","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"datetime","group_label":"时间/日期函数和操作符","lang":"en","layout":"table-new","pages":["functions-datetime.html","functions-info.html"],"prose_only":false,"signatures":[{"description":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","description_html":"Subtract arguments, producing a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","description_zh":"将两个参数相减，生成一个使用年和月而不是只用日的“符号化”结果","description_zh_html":"将两个参数相减，生成一个使用年和月而不是只用日的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e符号化\u003c/span\u003e”\u003c/span\u003e结果","examples":[{"expr":"age(timestamp '2001-04-10', timestamp '1957-06-13')","result":"43 years 9 mons 27 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e, \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp, timestamp ) → interval","zh_from":"same-version-manual"},{"description":"Subtract argument from current_date (at midnight)","description_html":"Subtract argument from \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e (at midnight)","description_zh":"从 current_date（午夜时刻）减去参数","description_zh_html":"从 \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e（午夜时刻）减去参数","examples":[{"expr":"age(timestamp '1957-06-13')","result":"62 years 6 mons 10 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp ) → interval","zh_from":"same-version-manual"},{"description":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_html":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_zh":"返回给定事务 ID 与当前事务计数器之间的事务数。","description_zh_html":"返回给定事务 ID 与当前事务计数器之间的事务数。","examples":[],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003exid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"age ( xid ) → integer","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-datetime.html","sha256":"2340eed8f18e5a5a727bb6bf8f828eedbab527da91082a214ea4f64a3b8750a6"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-DATETIME-TABLE","file":"functions-datetime.html","sha256":"8c5053713aeaacfbe4cb00effc61f10d457c98b2a29c724b10b93819a087ea95","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"age","SourceDatabase":"center","Version":"18","Locale":"en","Title":"age","Summary":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","BodyHTML":"Subtract arguments, producing a \u003cspan\u003e“\u003cspan\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","SourceRevision":"wiki-repair-20261023:290b1f8ee4bd23832970ecf498684ff096abc0a51a56bf89e838dfce5af835c9","ContentHash":"3d42587af3dc9de8ae018aab3b58e3b4ad94b458ca608d3433712eee306b9199","Payload":{"description":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","description_html":"Subtract arguments, producing a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","signatures":[{"description":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","description_html":"Subtract arguments, producing a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","description_zh":"将两个参数相减，生成一个使用年和月而不是只用日的“符号化”结果","description_zh_html":"将两个参数相减，生成一个使用年和月而不是只用日的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e符号化\u003c/span\u003e”\u003c/span\u003e结果","examples":[{"expr":"age(timestamp '2001-04-10', timestamp '1957-06-13')","result":"43 years 9 mons 27 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e, \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp, timestamp ) → interval","zh_from":"same-version-manual"},{"description":"Subtract argument from current_date (at midnight)","description_html":"Subtract argument from \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e (at midnight)","description_zh":"从 current_date（午夜时刻）减去参数","description_zh_html":"从 \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e（午夜时刻）减去参数","examples":[{"expr":"age(timestamp '1957-06-13')","result":"62 years 6 mons 10 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp ) → interval","zh_from":"same-version-manual"},{"description":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_html":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_zh":"返回给定事务 ID 与当前事务计数器之间的事务数。","description_zh_html":"返回给定事务 ID 与当前事务计数器之间的事务数。","examples":[],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003exid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"age ( xid ) → integer","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"ee2b4fe0dea77d42daef26d15691b541d89ed3ff175958ca1417eef48f47fdc4","Text":"age ( timestamp, timestamp ) → interval","Returns":"interval","Payload":{"description":"Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days","description_html":"Subtract arguments, producing a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003esymbolic\u003c/span\u003e”\u003c/span\u003e result that uses years and months, rather than just days","description_zh":"将两个参数相减，生成一个使用年和月而不是只用日的“符号化”结果","description_zh_html":"将两个参数相减，生成一个使用年和月而不是只用日的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e符号化\u003c/span\u003e”\u003c/span\u003e结果","examples":[{"expr":"age(timestamp '2001-04-10', timestamp '1957-06-13')","result":"43 years 9 mons 27 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e, \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp, timestamp ) → interval","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":1,"Hash":"00fbadba735ea48e692494b28d77c99c00a72bd075ff4b71fc8709b825289eb2","Text":"age ( timestamp ) → interval","Returns":"interval","Payload":{"description":"Subtract argument from current_date (at midnight)","description_html":"Subtract argument from \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e (at midnight)","description_zh":"从 current_date（午夜时刻）减去参数","description_zh_html":"从 \u003ccode class=\"function\"\u003ecurrent_date\u003c/code\u003e（午夜时刻）减去参数","examples":[{"expr":"age(timestamp '1957-06-13')","result":"62 years 6 mons 10 days"}],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003etimestamp\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"age ( timestamp ) → interval","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":2,"Hash":"2b9ee038109eda28d2ccee0f4f2cf55c4ce21246ebefdac5c01ec8eaebff0346","Text":"age ( xid ) → integer","Returns":"integer","Payload":{"description":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_html":"Returns the number of transactions between the supplied transaction id and the current transaction counter.","description_zh":"返回给定事务 ID 与当前事务计数器之间的事务数。","description_zh_html":"返回给定事务 ID 与当前事务计数器之间的事务数。","examples":[],"html":"\u003ccode class=\"function\"\u003eage\u003c/code\u003e ( \u003ccode class=\"type\"\u003exid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"age ( xid ) → integer","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
