The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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 (265) [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)