Upsert (INSERT ... ON CONFLICT DO ...)
已记录的来源状态与原始语言说明;缺少版本证据时明确标为未知。
来源快照记录 PostgreSQL 8.1–18 的变化节点;历史矩阵独立记录 7.4–18 的状态。两者均未记录 PostgreSQL 19 或 20 的支持状态,较新版本明确保留为未知。这些来源声明与运行测量相互独立。
SQL
说明
支持 upsert 功能,当遇到冲突时可以选择不执行任何操作,或将 INSERT 转换为 UPDATE。
更多信息请参阅 INSERT 文档。
所选版本: PostgreSQL 18
支持
比较版本
原始文档链接
已记录旧标识: 275
完整来源事实与出处
yaml · center · 1dd22bf9a7f3ec325b894e2836fda535a25529f246a94dd41d6abbfe9997f7fd
{
"Key": "upsert-insert-on-conflict-do",
"SourceKind": "yaml",
"SourceDatabase": "center",
"SourceTable": "featurematrix.yaml",
"SourceKey": "Upsert (INSERT ... ON CONFLICT DO ...)",
"SourceHash": "1dd22bf9a7f3ec325b894e2836fda535a25529f246a94dd41d6abbfe9997f7fd",
"Name": "Upsert (INSERT ... ON CONFLICT DO ...)",
"NameLocale": "en",
"GroupKey": "sql",
"GroupName": "SQL",
"GroupLocale": "en",
"Ordinal": 21,
"GroupOrder": 3,
"Facts": {
"feature": {
"description": "Support for upsert functionality which allows either no action to be taken when a conflict is encountered, or convert the INSERT to an UPDATE.\r\n\r\nFor more information, please see the [INSERT](https://www.postgresql.org/docs/current/sql-insert.html) documentation.",
"name": "Upsert (INSERT ... ON CONFLICT DO ...)",
"versions": {
"9.5": "Yes"
}
},
"group": "SQL",
"versions": {
"max": 18,
"min": 8.1
}
},
"Cells": [
{
"Version": "10",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "11",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "12",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "13",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "14",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "15",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "16",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "17",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "18",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "8.1",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "8.2",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "8.3",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "8.4",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.0",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.1",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.2",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.3",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.4",
"State": "no",
"EvidenceKind": "yaml-default-no",
"TransitionVersion": "",
"Supported": false,
"Original": "No"
},
{
"Version": "9.5",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
},
{
"Version": "9.6",
"State": "yes",
"EvidenceKind": "yaml-transition",
"TransitionVersion": "9.5",
"Supported": true,
"Original": "Yes"
}
],
"Texts": [
{
"Locale": "en",
"Title": "Upsert (INSERT ... ON CONFLICT DO ...)",
"BodyHTML": "\u003cp\u003eSupport for upsert functionality which allows either no action to be taken when a conflict is encountered, or convert the INSERT to an UPDATE.\u003c/p\u003e\n\u003cp\u003eFor more information, please see the \u003ca href=\"https://www.postgresql.org/docs/current/sql-insert.html\" rel=\"nofollow\"\u003eINSERT\u003c/a\u003e documentation.\u003c/p\u003e\n",
"SourceHash": "1dd22bf9a7f3ec325b894e2836fda535a25529f246a94dd41d6abbfe9997f7fd",
"ContentHash": "e9c43cd395fb9500db142a6e1670db53980c9a51e0b426272b840645aaab57c2",
"Payload": {
"description": "Support for upsert functionality which allows either no action to be taken when a conflict is encountered, or convert the INSERT to an UPDATE.\r\n\r\nFor more information, please see the [INSERT](https://www.postgresql.org/docs/current/sql-insert.html) documentation.",
"name": "Upsert (INSERT ... ON CONFLICT DO ...)",
"versions": {
"9.5": "Yes"
}
}
},
{
"Locale": "zh-Hans",
"Title": "Upsert (INSERT ... ON CONFLICT DO ...)",
"BodyHTML": "\u003cp\u003e支持 upsert 功能,当遇到冲突时可以选择不执行任何操作,或将 INSERT 转换为 UPDATE。\u003c/p\u003e\n\u003cp\u003e更多信息请参阅 \u003ca href=\"https://www.postgresql.org/docs/current/sql-insert.html\" rel=\"nofollow\"\u003eINSERT\u003c/a\u003e 文档。\u003c/p\u003e\n",
"SourceHash": "071091951021357a5f492adb04caed6febf4d315ac2626ca027a48dd8ec01d50",
"ContentHash": "58af7b10c3f4a3cd7e41eb6b92a9741f0d73af807cdb07953fd5b14a9818a4a2",
"Payload": {
"description": "支持 upsert 功能,当遇到冲突时可以选择不执行任何操作,或将 INSERT 转换为 UPDATE。\n\n更多信息请参阅 [INSERT](https://www.postgresql.org/docs/current/sql-insert.html) 文档。",
"name": "Upsert (INSERT ... ON CONFLICT DO ...)"
}
}
],
"GroupTitles": {
"en": "SQL",
"zh-Hans": "SQL"
},
"LegacyIDs": [
"275"
]
}