osm2pgsql already supports `real`, which is [single precision floating point in PostgreSQL](https://www.postgresql.org/docs/current/datatype-numeric.html#:~:text=real). This patch adds `type = "double"` for PostgreSQL [`double precision` columns](https://www.postgresql.org/docs/current/datatype-numeric.html#:~:text=double%20precision).
Users were still able to add this type of column with `sql_type = "double precision"}` (e.g. [postpass lua](https://github.com/woodpeck/postpass-ops/blob/0d526cf414eb4e52efb0fbbca169409f70fe8ed0/postpass.lua#L74)). But this makes it easier. Lua uses [double precision floating point types](https://www.lua.org/manual/5.5/manual.html#2.1:~:text=Standard%20Lua%20uses%2064%2Dbit%20integers%20and%20double%2Dprecision%20%2864%2Dbit%29%20floats%2C) by default. This PR is in draft, because I was unable to run the tests. I have successfully tested this code locally. But I am not confident enough with how the interacts with lua. I would appreciate someone confirming it's OK. Documentation for this is on my [`osm2pgsql-website` fork](https://github.com/osm2pgsql-dev/osm2pgsql-website/compare/master...amandasaurus:osm2pgsql-website:pg-num-types?expand=1) You can view, comment on, or merge this pull request online at: https://github.com/osm2pgsql-dev/osm2pgsql/pull/2488 -- Commit Summary -- * Support type="double" for columns, -- File Changes -- M src/flex-table-column.cpp (3) M src/flex-table-column.hpp (1) M src/flex-write.cpp (10) -- Patch Links -- https://github.com/osm2pgsql-dev/osm2pgsql/pull/2488.patch https://github.com/osm2pgsql-dev/osm2pgsql/pull/2488.diff -- Reply to this email directly or view it on GitHub: https://github.com/osm2pgsql-dev/osm2pgsql/pull/2488 You are receiving this because you are subscribed to this thread. Message ID: <osm2pgsql-dev/osm2pgsql/pull/[email protected]>
_______________________________________________ Tile-serving mailing list [email protected] https://lists.openstreetmap.org/listinfo/tile-serving
