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.

I hope the the authors still watch this forum...Im running into this issue.

When I run:

INSERT INTO ch07.bag_o_rasters(rast_name, rast)  
WITH a1 AS (SELECT ST_Buffer(ST_GeomFromText('LINESTRING(448252 5414206,448289 5414317,448293 5414330,448324 5414417,448351 5414495)', 32631),10) As geom)
SELECT 'disprop road', ST_AsRaster(geom,50,500) FROM a1
SELECT 'proport fixed w road', 
        (ST_YMax(geom) - ST_YMin(geom)) *  200 / 
        (ST_XMax(geom) - ST_XMin(geom)))::integer 
FROM a1;

I get:

ERROR:  syntax error at or near "FROM"
LINE 9: FROM a1;
********** Error **********

ERROR: syntax error at or near "FROM"
SQL state: 42601
Character: 432
code downloaded from the website does not reflect what is shown in the book.

14.1 - "state varchar(2)", should be added to sql file. And the second constraint should be renamed in sql file to, "pk_roads"
Hi Regina, and Leo

the link on to the chapter 14 code/data is pointing to chp 15 code/data.