PostgresAdapter::getColumns does not fully define postgis columns
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
The getColumns function for the PostgresAdapter does not handle geometric or geographic types very well, missing in capturing the defined shape, as well as set coordinate system. This is due to the fact that this information is not set in the information_schema.columns table, but rather Postgis defines two secondary tables geometry_columns and geography_columns tables. While cycling through each column, if the type is geography or geometry, query the above tables as appropriate (e.g. SELECT * FROM public.geography_columns WHERE f_table_schema = %s AND f_table_name = %s).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at PostgresAdapter::getColumns and inspect how columns are read from information_schema.columns. For geography and geometry types, consult the corresponding PostGIS geography_columns or geometry_columns metadata using the schema and table names; done means the returned column information includes its defined shape and coordinate system.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100