tagbase / tagbase-server

tagbase-server is a data management web service for working with eTUFF and nc-eTAG files.
https://oiip.jpl.nasa.gov/doc/OIIP_Deliverable7.4_TagbasePostgreSQLeTUFF_UserGuide.pdf
Apache License 2.0
7 stars 2 forks source link

data_position.lon needs to be cast to integer in tagbase_materialized_views.sql #218

Closed lewismc closed 1 year ago

lewismc commented 1 year ago

Currently tagbase_materialized_views.sql can only be executed manually. I hadn't tried this for a while and noticed that the PostgreSQL Query Tool will throw an exception when I attempt to execute the script. Here is an example

ERROR:  operator does not exist: character varying > integer
LINE 17:     CASE WHEN data_position.lon > 180 THEN data_position.lon...
                                         ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.
SQL state: 42883
Character: 518

We need to cast the char var to integer.

lewismc commented 1 year ago

PR coming up.