PostgreSQL字段名的最大长度是多少?

PostgreSQL的字段名和索引名的最大长度默认是63。任何超过这个长度的标识符会被自动截断到 63 个字节。
当然也可以通过重新编译PostgreSQL来修改这默认值。

官方文档
https://www.postgresql.org/docs/16/runtime-config-preset.html

Reports the maximum identifier length. It is determined as one less than the value of NAMEDATALEN when building the server. The default value of NAMEDATALEN is 64; therefore the default max_identifier_length is 63 bytes, which can be less than 63 characters when using multibyte encodings.