gpt4 book ai didi

postgresql - shp2pgsql 创建表但 psql 报告 "relation...does not exist"

转载 作者:行者123 更新时间:2023-11-29 13:32:37 25 4
gpt4 key购买 nike

使用 shp2pgsql 将 shapefile 导入 PostGIS 数据库,一切正常:

Connection: host=localhost port=5432 user=aperrin dbname=tweets password='******' 
Destination: public.County_2010Census_DP1
Source File: /home/aperrin/Downloads/County_2010Census_DP1/County_2010Census_DP1
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
Importing shapefile (3221 records)...
Creating spatial index...

Shapefile import completed.

在 psql 中,\d 显示:

                          List of relations
Schema | Name | Type | Owner
--------+-----------------------------------------+----------+----------
public | County_2010Census_DP1 | table | aperrin
public | County_2010Census_DP1_gid_seq | sequence | aperrin

但是:

tweets=> \d County_2010Census_DP1
Did not find any relation named "County_2010Census_DP1".
tweets=> select * from County_2010Census_DP1;
ERROR: relation "county_2010census_dp1" does not exist
LINE 1: select * from County_2010Census_DP1;

最佳答案

使用全小写的表名解决了这个问题。使用 us_counties 作为表名。

关于postgresql - shp2pgsql 创建表但 psql 报告 "relation...does not exist",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20054744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com