example project: create 'cities' table and import data

This commit is contained in:
Helmut Merz 2020-02-18 11:57:24 +01:00
parent fca4f3643c
commit f4c0bd42a3
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,10 @@
-- the input file is made accessible for the postgres process
-- via a symbolic link to to the storage-common package
copy cities
from '/var/lib/postgresql/data/storage-common/examples/cities/data/cities.csv'
with (
format csv,
header true
)

View file

@ -0,0 +1,13 @@
create table cities (
rectype int,
ctype int,
regiokey text not null primary key,
ckey text not null,
name text,
area decimal,
inhabitants int,
zipcode text,
long decimal,
lat decimal
);