首页 > 解决方案 > Postgres NATURAL 作为属性表示为“自然”

问题描述

我正在使用 openstreetmap 数据并使用工具将其导入 postgres 数据库。openstreetmap 中的一个关键术语是natural

导入此数据时,postgres 数据库表中的列名是natural. 问题是,在某些客户端中读取表时,该属性natural表示为"natural"导致问题。

有没有办法存储"natural"natural帮助客户正确阅读?

标签: postgresqlopenstreetmap

解决方案


natural 是 postgres 中的保留关键字:

https://www.postgresql.org/docs/current/sql-keywords-appendix.html

如果将关键字用作标识符,则必须引用它们。如果可能,请选择其他名称。


推荐阅读