mishari (4) [Avatar] Offline
#1
Hi,

The query:
INSERT INTO ch01.restaurants (franchise, geom)
SELECT franchise
, ST_Transform(
ST_SetSRID(ST_Point(lon , lat), 4326)
, 2163) As geom
FROM ch01.restaurants_staging;

results in the following error:
ERROR: Geometry SRID (2163) does not match column SRID (2136)

********** Error **********

ERROR: Geometry SRID (2163) does not match column SRID (2136)
SQL state: 22023

Does anyone know why this is happening?
mishari (4) [Avatar] Offline
#2
Re: Error inserting restaurant data from staging table
This is strange. The problem occurred when I had typed everything in manually from the book. When I used the downloaded SQL file and copy & pasted from there, it is fine.
regina.leo (260) [Avatar] Offline
#3
Re: Error inserting restaurant data from staging table
We checked the first chapter of book and code looks right. In fact I thin it reads directly from the code as an include.

IT seems that maybe you mistyped 2163 as 2136 when you were running listing 1.3 (that creates the ch01.restaurants table)