我是postgre和Ubuntu的新手.我正在使用Ubuntu 14.04 LTS Trusty运行VM.我正在尝试安装PostgreSql9.4数据库和PostGIS 2.1.这是我在Ubuntu机器上运行的命令:
sudo apt-get install wget ca-certificates
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误.
The following packages have unmet dependencies:
pgadmin3 : Depends: libwxbase3.0-0 (>= 3.0.0) but it is not installable
Depends: libwxgtk3.0-0 (>= 3.0.0) but it is not installable
Recommends: pgagent but it is not going to be … 我在那有重叠的两列数据的Postgres下表a_sno和b_sno.
create table data
( a_sno integer not null,
b_sno integer not null,
PRIMARY KEY (a_sno,b_sno)
);
insert into data (a_sno,b_sno) values
( 4, 5 )
, ( 5, 4 )
, ( 5, 6 )
, ( 6, 5 )
, ( 6, 7 )
, ( 7, 6 )
, ( 9, 10)
, ( 9, 13)
, (10, 9 )
, (13, 9 )
, (10, 13)
, (13, 10)
, (10, 14) …Run Code Online (Sandbox Code Playgroud)