Database Reference
In-Depth Information
Tip
Make sure that the firenews.csv file is in a location accessible from
thePostgreSQLprocessuser.Forexample,inLinux,copythefiletothe
/tmp directory.
If you are on Windows, you most likely will need to set the encoding to
UTF-8 before copying:
postgis_cookbook=# set client_encoding
to 'UTF-8';
4. CheckifalloftherecordshavebeenimportedfromtheCSVfiletothePost-
greSQL table:
postgis_cookbook=> SELECT COUNT(*) FROM
chp01.firenews;
The output of the preceding command is as follows:
count
-------
3006
(1 row)
5. Check if a record related to this new table is in the PostGIS geo-
metry_columns metadata view:
postgis_cookbook=# SELECT f_table_name,
f_geometry_column, coord_dimension, srid,
type FROM geometry_columns where
f_table_name = 'firenews';
f_table_name | f_geometry_column |
coord_dimension | srid | type
Search WWH ::




Custom Search