[postgis-users] CTE example

Andy Colson andy at squeakycode.net
Tue Mar 5 12:03:30 PST 2013


On 03/05/2013 01:52 PM, Patrick Browne wrote:
> I am trying to run the CTE example on slide 22 from http://www.postgis.us/downloads/oscon2009_PostGISTips.pdf
>
> When I paste the example into the SQL-shell I get the following error:
>
>      ERROR: operator does not exist: record - integer LINE 14: ... x, y, ST_SetSRID(ST_MakeBox2d(ST_Point(xmin + (x - 1)*g_wid... HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts
>
> I am using POSTGIS 1.4.1 with Postgres 8.4 I used the data that accompany the slides.
>
>
> Any advice will be much appreciated.
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>

I didn't want to read the pdf, so going just based on the text above, I'd say that (x - 1) isnt what you think.

x isn't an integer at this point, its one row of a table maybe?  Do you have more than one thing named x?

I'm assuming PG is looking for an operator "-" (minus) that takes a record and an integer as arguments.

Thats my interpretation of "operator does not exist: record - integer"

-Andy


More information about the postgis-users mailing list