Skip to content

Instantly share code, notes, and snippets.

@ghing
Created July 8, 2011 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghing/1072696 to your computer and use it in GitHub Desktop.
Save ghing/1072696 to your computer and use it in GitHub Desktop.
Postgres logs behind 500 error
2011-07-08 15:03:00 CDT ERROR: GEOS Intersection() threw an error!
2011-07-08 15:03:00 CDT STATEMENT: SELECT rd.id,
rd.district_id,
rd.name,
rd.is_locked,
lmt.version,
rd.plan_id,
rc.subject_id,
rc.number,
st_asgeojson(
st_intersection(
st_geometryn(rd.simple,3),
st_envelope(
('SRID=' || (select st_srid(rd.simple)) || ';LINESTRING(-9973220.566558 4783356.2731
40,-8432250.076605 5010832.869276)')::geometry
)
)
) as geom ,
rd.num_members
FROM redistricting_district as rd
JOIN redistricting_computedcharacteristic as rc
ON rd.id = rc.district_id
JOIN (
SELECT max(version) as version,district_id
FROM redistricting_district
WHERE plan_id = 90
AND version <= 0
GROUP BY district_id)
AS lmt
ON rd.district_id = lmt.district_id
WHERE rd.plan_id = 90
AND rc.subject_id = 18
AND lmt.version = rd.version
AND st_intersects(
st_geometryn(rd.simple,3),
st_envelope(
('SRID=' || (select st_srid(rd.simple)) || ';LINESTRING(-9973220.566558 4783356.273140,-8432250.076605 5010832.869276)')::geometry
)
) AND NOT rd.name = 'Unassigned'
2011-07-08 15:03:00 CDT ERROR: current transaction is aborted, commands ignored until end of transaction block
2011-07-08 15:03:00 CDT STATEMENT: SAVEPOINT s140186118670080_x1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment