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

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

Wiki / SQLSTATE

22P04 — bad_copy_file_format

COPY 文件结构错误,如字段数或头部不符。

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

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

aliases
未知
class name
Data Exception
condition name
bad_copy_file_format
lang
en
sqlstate
22P04

版本定义 PG 18

22P04

速览 {#at-a-glance}

22P04 是 COPY 文件格式边界。固定解析器在二进制签名和头部、文本或 CSV 帧、头部/行字段数以及二进制字段长度错误时使用它。它表示 COPY 结构错误,不是所有值转换失败的统称。

含义 {#meaning}

二进制输入会校验 PGCOPY 签名、flags、扩展长度、行字段数、字段长度和结束标记。代表性主消息包括 COPY file signature not recognized、invalid COPY file header (missing flags)、invalid COPY file header (wrong length)、row field count is %d, expected %d、invalid field size 和 unexpected EOF in COPY data。

文本和 CSV 有独立的帧检查。头部匹配可能报告 wrong number of fields in header line: got %d, expected %d 或列名不匹配;普通行可能报告 extra data after last expected column 或 missing data for column "%s"。CSV 引号和换行可能报告 unterminated CSV quoted field、unquoted carriage return found in data 或 unquoted newline found in data;文本模式使用对应的 literal ... found in data 消息和提示。帧已正确解析但值无法转换时通常属于 22P02;二进制类型接收函数留下未消费字节时可能是 22P03。

报文 {#messages}

固定源码中的代表性主消息均为 ERROR:

  • 二进制头部/字段:COPY file signature not recognized;invalid COPY file header (missing flags);unrecognized critical flags in COPY file header;invalid COPY file header (missing length);invalid COPY file header (wrong length);invalid field size;unexpected EOF in COPY data。
  • 头部和行:wrong number of fields in header line: got %d, expected %d;column name mismatch in header line field %d: got "%s", expected "%s";extra data after last expected column;missing data for column "%s";row field count is %d, expected %d。
  • CSV 和行帧:unterminated CSV quoted field;literal carriage return found in data;unquoted carriage return found in data;literal newline found in data;unquoted newline found in data;end-of-copy marker is not alone on its line。回车/换行变体还会携带使用 \r、\n 或带引号 CSV 字段的源码提示。

诊断 {#diagnosis}

先确定来源是文本、CSV、二进制 COPY 还是前端 COPY-in。保留完整主消息,因为它能定位解析阶段。依次检查二进制签名/标志位/长度、头部和目标列顺序、行字段数、CSV 引号/转义与换行规则,以及文本 COPY 的数据结束标记是否单独占行,之后再检查目标类型的输入转换。

ON_ERROR IGNORE 不是通用的坏行跳过开关。固定文本/CSV 路径会围绕安全的类型输入转换处理软错误,并可发出通知后跳过数据类型不兼容的行;头部、字段数、行帧、CSV 引号和二进制结构错误仍以 ERROR 抛出,不能都靠这个选项跳过。

处理 {#response}

按声明的文本/CSV/二进制格式、目标列顺序,重新生成带正确头部、长度、引号和行格式的流。前端 COPY-in 出错时,按当前 COPY 子协议状态结束输入,适当时使用 CopyFail。如果 COPY 由扩展协议发起且后端发送 ErrorResponse,客户端应发送 Sync 并等待 ReadyForQuery;如果由 simple Query 发起,剩余查询消息会被丢弃,随后直接发送 ReadyForQuery;客户端不需要发送 Sync,消费该 ReadyForQuery 后再发送下一条查询。不要在 COPY-in 期间发送普通 SQL。显式事务中的 ERROR 要在协议边界恢复后执行 ROLLBACK 或 ROLLBACK TO SAVEPOINT;ReadyForQuery 只报告状态,不能替代事务恢复。ON_ERROR IGNORE 只可能适用于文档所说的安全类型输入失败,不能修复坏头或损坏的 CSV/二进制帧。普通 COPY ERROR 本身不要求重置连接。

版本 {#versions}

锁定目录从 PostgreSQL 7.4 记录此条件。引用的解析器及 ON_ERROR 边界来自 PostgreSQL 18.6 REL_18_6;本次没有运行自然 COPY 文件案例。

相关 {#related}

22P02、22P03、2200B

来源 {#sources}

src/backend/commands/copyfromparse.c#L190-L228

src/backend/commands/copyfromparse.c#L779-L827

src/backend/commands/copyfromparse.c#L937-L977

src/backend/commands/copyfromparse.c#L1026-L1073

src/backend/commands/copyfromparse.c#L1084-L1130

src/backend/commands/copyfromparse.c#L1388-L1432

src/backend/commands/copyfromparse.c#L1818-L1922

src/backend/tcop/postgres.c#L416-L445

doc/src/sgml/protocol.sgml#L1287-L1318

结构化证据记录保存代表性精确主消息/提示以及 ON_ERROR 的结构边界。

比较版本

SQLSTATE 证据与已记录的运行版本

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read fixed definition.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "22P04 is bad_copy_file_format in SQLSTATE Class 22."
}
claims · headers-and-fields
{
  "claim_id": "headers-and-fields",
  "limits": "",
  "method": "Read the complete header, row, and field guards.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.path.binary-header",
    "src.path.text-header",
    "src.path.text-row",
    "src.path.binary-row",
    "src.path.binary-field"
  ],
  "statement": "The fixed COPY parser uses 22P04 for binary signature/flags/extension length, text or CSV header field counts and names, extra or missing fields, and binary row/field framing."
}
claims · csv-and-line-framing
{
  "claim_id": "csv-and-line-framing",
  "limits": "",
  "method": "Read the complete line and CSV parsers.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.path.line-framing",
    "src.path.copy-marker",
    "src.path.csv"
  ],
  "statement": "Text and CSV line framing errors, end-of-copy marker placement, and unterminated quoted fields use 22P04; CSV quoting and text escape rules choose different primary/hint variants."
}
claims · on-error-boundary
{
  "claim_id": "on-error-boundary",
  "limits": "This is source-backed; no ON_ERROR runtime was executed.",
  "method": "Read InputFunctionCallSafe handling separately from structural parser errors.",
  "position": 3,
  "runtime": [],
  "sources": [
    "src.path.on-error",
    "src.path.csv",
    "src.path.binary-row"
  ],
  "statement": "ON_ERROR IGNORE is applied around safe text/CSV type-input conversion failures and emits a skip notice; it does not turn COPY header, row framing, CSV quoting, or binary field structure errors into skippable rows."
}
claims · history
{
  "claim_id": "history",
  "limits": "",
  "method": "Use catalogue boundary.",
  "position": 4,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records 22P04 from 7.4; that boundary does not prove exact implementation introduction."
}
claims · copy-protocol
{
  "claim_id": "copy-protocol",
  "limits": "",
  "method": "Read the frontend message flags and the fixed COPY-in protocol documentation.",
  "position": 5,
  "runtime": [],
  "sources": [
    "src.path.protocol-flags",
    "doc.protocol.copy"
  ],
  "statement": "Frontend COPY-in errors follow the protocol that started COPY: extended-query COPY discards frontend messages until Sync and then sends ReadyForQuery, while simple Query COPY discards the rest of the query and sends ReadyForQuery without Sync. The frontend loop marks extended messages for skip-until-Sync recovery, and ReadyForQuery reports status rather than replacing transaction recovery."
}
messages · message.signature
{
  "limits": "",
  "message_id": "message.signature",
  "path": "",
  "position": 0,
  "raw": {
    "id": "message.signature",
    "primary_template": "COPY file signature not recognized",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "COPY file signature not recognized",
      "position": 0,
      "role": "",
      "template": "COPY file signature not recognized"
    }
  ]
}
messages · message.header-flags
{
  "limits": "",
  "message_id": "message.header-flags",
  "path": "",
  "position": 1,
  "raw": {
    "id": "message.header-flags",
    "primary_template": "invalid COPY file header (missing flags)",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "invalid COPY file header (missing flags)",
      "position": 0,
      "role": "",
      "template": "invalid COPY file header (missing flags)"
    }
  ]
}
messages · message.header-critical
{
  "limits": "",
  "message_id": "message.header-critical",
  "path": "",
  "position": 2,
  "raw": {
    "id": "message.header-critical",
    "primary_template": "unrecognized critical flags in COPY file header",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "unrecognized critical flags in COPY file header",
      "position": 0,
      "role": "",
      "template": "unrecognized critical flags in COPY file header"
    }
  ]
}
messages · message.header-length
{
  "limits": "",
  "message_id": "message.header-length",
  "path": "",
  "position": 3,
  "raw": {
    "id": "message.header-length",
    "primary_template": "invalid COPY file header (missing length)",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "invalid COPY file header (missing length)",
      "position": 0,
      "role": "",
      "template": "invalid COPY file header (missing length)"
    }
  ]
}
messages · message.header-wrong-length
{
  "limits": "",
  "message_id": "message.header-wrong-length",
  "path": "",
  "position": 4,
  "raw": {
    "id": "message.header-wrong-length",
    "primary_template": "invalid COPY file header (wrong length)",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "invalid COPY file header (wrong length)",
      "position": 0,
      "role": "",
      "template": "invalid COPY file header (wrong length)"
    }
  ]
}
messages · message.header-fields
{
  "limits": "",
  "message_id": "message.header-fields",
  "path": "",
  "position": 5,
  "raw": {
    "id": "message.header-fields",
    "primary_template": "wrong number of fields in header line: got %d, expected %d",
    "severity_source": "ERROR",
    "sources": [
      "src.path.text-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.text-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "wrong number of fields in header line: got , expected",
      "position": 0,
      "role": "",
      "template": "wrong number of fields in header line: got %d, expected %d"
    }
  ]
}
messages · message.header-name
{
  "limits": "",
  "message_id": "message.header-name",
  "path": "",
  "position": 6,
  "raw": {
    "id": "message.header-name",
    "primary_template": "column name mismatch in header line field %d: got \"%s\", expected \"%s\"",
    "severity_source": "ERROR",
    "sources": [
      "src.path.text-header"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.text-header"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "column name mismatch in header line field : got \" \", expected \" \"",
      "position": 0,
      "role": "",
      "template": "column name mismatch in header line field %d: got \"%s\", expected \"%s\""
    }
  ]
}
messages · message.extra
{
  "limits": "",
  "message_id": "message.extra",
  "path": "",
  "position": 7,
  "raw": {
    "id": "message.extra",
    "primary_template": "extra data after last expected column",
    "severity_source": "ERROR",
    "sources": [
      "src.path.text-row"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.text-row"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "extra data after last expected column",
      "position": 0,
      "role": "",
      "template": "extra data after last expected column"
    }
  ]
}
messages · message.missing
{
  "limits": "",
  "message_id": "message.missing",
  "path": "",
  "position": 8,
  "raw": {
    "id": "message.missing",
    "primary_template": "missing data for column \"%s\"",
    "severity_source": "ERROR",
    "sources": [
      "src.path.text-row"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.text-row"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "missing data for column \" \"",
      "position": 0,
      "role": "",
      "template": "missing data for column \"%s\""
    }
  ]
}
messages · message.row-count
{
  "limits": "",
  "message_id": "message.row-count",
  "path": "",
  "position": 9,
  "raw": {
    "id": "message.row-count",
    "primary_template": "row field count is %d, expected %d",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-row"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-row"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "row field count is , expected",
      "position": 0,
      "role": "",
      "template": "row field count is %d, expected %d"
    }
  ]
}
messages · message.field-size
{
  "limits": "",
  "message_id": "message.field-size",
  "path": "",
  "position": 10,
  "raw": {
    "id": "message.field-size",
    "primary_template": "invalid field size",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-field"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-field"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "invalid field size",
      "position": 0,
      "role": "",
      "template": "invalid field size"
    }
  ]
}
messages · message.eof
{
  "limits": "",
  "message_id": "message.eof",
  "path": "",
  "position": 11,
  "raw": {
    "id": "message.eof",
    "primary_template": "unexpected EOF in COPY data",
    "severity_source": "ERROR",
    "sources": [
      "src.path.binary-field"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.binary-field"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "unexpected EOF in COPY data",
      "position": 0,
      "role": "",
      "template": "unexpected EOF in COPY data"
    }
  ]
}
messages · message.csv-unterminated
{
  "limits": "",
  "message_id": "message.csv-unterminated",
  "path": "",
  "position": 12,
  "raw": {
    "id": "message.csv-unterminated",
    "primary_template": "unterminated CSV quoted field",
    "severity_source": "ERROR",
    "sources": [
      "src.path.csv"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.csv"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "unterminated CSV quoted field",
      "position": 0,
      "role": "",
      "template": "unterminated CSV quoted field"
    }
  ]
}
messages · message.literal-cr
{
  "limits": "",
  "message_id": "message.literal-cr",
  "path": "",
  "position": 13,
  "raw": {
    "hint_template": "Use \"\\r\" to represent carriage return.",
    "id": "message.literal-cr",
    "primary_template": "literal carriage return found in data",
    "severity_source": "ERROR",
    "sources": [
      "src.path.line-framing"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.line-framing"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "literal carriage return found in data",
      "position": 0,
      "role": "",
      "template": "literal carriage return found in data"
    },
    {
      "kind": "hint",
      "literal": "Use \"\\r\" to represent carriage return.",
      "position": 1,
      "role": "",
      "template": "Use \"\\r\" to represent carriage return."
    }
  ]
}
messages · message.csv-cr
{
  "limits": "",
  "message_id": "message.csv-cr",
  "path": "",
  "position": 14,
  "raw": {
    "hint_template": "Use quoted CSV field to represent carriage return.",
    "id": "message.csv-cr",
    "primary_template": "unquoted carriage return found in data",
    "severity_source": "ERROR",
    "sources": [
      "src.path.line-framing"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.line-framing"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "unquoted carriage return found in data",
      "position": 0,
      "role": "",
      "template": "unquoted carriage return found in data"
    },
    {
      "kind": "hint",
      "literal": "Use quoted CSV field to represent carriage return.",
      "position": 1,
      "role": "",
      "template": "Use quoted CSV field to represent carriage return."
    }
  ]
}
messages · message.literal-newline
{
  "limits": "",
  "message_id": "message.literal-newline",
  "path": "",
  "position": 15,
  "raw": {
    "hint_template": "Use \"\\n\" to represent newline.",
    "id": "message.literal-newline",
    "primary_template": "literal newline found in data",
    "severity_source": "ERROR",
    "sources": [
      "src.path.line-framing"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.line-framing"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "literal newline found in data",
      "position": 0,
      "role": "",
      "template": "literal newline found in data"
    },
    {
      "kind": "hint",
      "literal": "Use \"\\n\" to represent newline.",
      "position": 1,
      "role": "",
      "template": "Use \"\\n\" to represent newline."
    }
  ]
}
messages · message.csv-newline
{
  "limits": "",
  "message_id": "message.csv-newline",
  "path": "",
  "position": 16,
  "raw": {
    "hint_template": "Use quoted CSV field to represent newline.",
    "id": "message.csv-newline",
    "primary_template": "unquoted newline found in data",
    "severity_source": "ERROR",
    "sources": [
      "src.path.line-framing"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.line-framing"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "unquoted newline found in data",
      "position": 0,
      "role": "",
      "template": "unquoted newline found in data"
    },
    {
      "kind": "hint",
      "literal": "Use quoted CSV field to represent newline.",
      "position": 1,
      "role": "",
      "template": "Use quoted CSV field to represent newline."
    }
  ]
}
messages · message.marker-alone
{
  "limits": "",
  "message_id": "message.marker-alone",
  "path": "",
  "position": 17,
  "raw": {
    "id": "message.marker-alone",
    "primary_template": "end-of-copy marker is not alone on its line",
    "severity_source": "ERROR",
    "sources": [
      "src.path.copy-marker"
    ],
    "sqlstate": "22P04"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.copy-marker"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "end-of-copy marker is not alone on its line",
      "position": 0,
      "role": "",
      "template": "end-of-copy marker is not alone on its line"
    }
  ]
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L208"
}
sources · src.path.binary-header
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 1,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.binary-header",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L190"
}
sources · src.path.text-header
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 2,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.text-header",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L779"
}
sources · src.path.text-row
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 3,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.text-row",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L937"
}
sources · src.path.on-error
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 4,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.on-error",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L1026"
}
sources · src.path.binary-row
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 5,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.binary-row",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L1084"
}
sources · src.path.line-framing
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 6,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.line-framing",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L1388"
}
sources · src.path.copy-marker
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 7,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.copy-marker",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L1465"
}
sources · src.path.csv
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 8,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.csv",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L1818"
}
sources · src.path.binary-field
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/copyfromparse.c",
  "position": 9,
  "sha256": "bc42754023579cd782a3cb3f144ad2c2c3d3aa46119eb7567fcdb05f2d445571",
  "source_id": "src.path.binary-field",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfromparse.c#L2012"
}
sources · src.path.protocol-flags
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/tcop/postgres.c",
  "position": 10,
  "sha256": "9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061",
  "source_id": "src.path.protocol-flags",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L416-L445"
}
sources · doc.protocol.copy
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "https://www.postgresql.org/docs/18/protocol.html",
  "kind": "upstream_source",
  "location": "",
  "path": "doc/src/sgml/protocol.sgml",
  "position": 11,
  "sha256": "745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89",
  "source_id": "doc.protocol.copy",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L1287-L1318"
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:4e99243e81d0e1f15fcdb55bc943e7d38a233ee48b8d22f8c5249f219aaf7beb

正文语言: zh-Hans · english-manuals:4e99243e81d0e1f15fcdb55bc943e7d38a233ee48b8d22f8c5249f219aaf7beb