-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL+PostGIS: not found table 'public.topology' (non-default schema issue) #181
Comments
Hi @rafi ! Thank you for your report !!! Could you provide an example DDL please? I can't reproduce the error you're seeing now. I tried as below. docker-compose.yml
Example DDLCREATE EXTENSION IF NOT EXISTS postgis;
DROP TABLE IF EXISTS test_table;
CREATE TABLE IF NOT EXISTS test_table
(
gid INTEGER PRIMARY KEY,
geom GEOMETRY(POINT, 4612)
); PostgreSQL/PostDIS version
\dt
tbls doc✅ Success $ tbls version
1.28.2
$ tbls doc pg://postgres:pgpass@localhost:55433/testdb\?sslmode=disable -f
dbdoc/schema.png
dbdoc/public.spatial_ref_sys.png
dbdoc/public.geography_columns.png
dbdoc/public.geometry_columns.png
dbdoc/public.raster_columns.png
dbdoc/public.raster_overviews.png
dbdoc/topology.topology.png
dbdoc/topology.layer.png
dbdoc/tiger.geocode_settings.png
dbdoc/tiger.geocode_settings_default.png
dbdoc/tiger.direction_lookup.png
dbdoc/tiger.secondary_unit_lookup.png
dbdoc/tiger.state_lookup.png
dbdoc/tiger.street_type_lookup.png
dbdoc/tiger.place_lookup.png
dbdoc/tiger.county_lookup.png
dbdoc/tiger.countysub_lookup.png
dbdoc/tiger.zip_lookup_all.png
dbdoc/tiger.zip_lookup_base.png
dbdoc/tiger.zip_lookup.png
dbdoc/tiger.county.png
dbdoc/tiger.state.png
dbdoc/tiger.place.png
dbdoc/tiger.zip_state.png
dbdoc/tiger.zip_state_loc.png
dbdoc/tiger.cousub.png
dbdoc/tiger.edges.png
dbdoc/tiger.addrfeat.png
dbdoc/tiger.faces.png
dbdoc/tiger.featnames.png
dbdoc/tiger.addr.png
dbdoc/tiger.zcta5.png
dbdoc/tiger.loader_platform.png
dbdoc/tiger.loader_variables.png
dbdoc/tiger.loader_lookuptables.png
dbdoc/tiger.tract.png
dbdoc/tiger.tabblock.png
dbdoc/tiger.bg.png
dbdoc/tiger.pagc_gaz.png
dbdoc/tiger.pagc_lex.png
dbdoc/tiger.pagc_rules.png
dbdoc/public.test_table.png
dbdoc/README.md
dbdoc/public.spatial_ref_sys.md
dbdoc/public.geography_columns.md
dbdoc/public.geometry_columns.md
dbdoc/public.raster_columns.md
dbdoc/public.raster_overviews.md
dbdoc/topology.topology.md
dbdoc/topology.layer.md
dbdoc/tiger.geocode_settings.md
dbdoc/tiger.geocode_settings_default.md
dbdoc/tiger.direction_lookup.md
dbdoc/tiger.secondary_unit_lookup.md
dbdoc/tiger.state_lookup.md
dbdoc/tiger.street_type_lookup.md
dbdoc/tiger.place_lookup.md
dbdoc/tiger.county_lookup.md
dbdoc/tiger.countysub_lookup.md
dbdoc/tiger.zip_lookup_all.md
dbdoc/tiger.zip_lookup_base.md
dbdoc/tiger.zip_lookup.md
dbdoc/tiger.county.md
dbdoc/tiger.state.md
dbdoc/tiger.place.md
dbdoc/tiger.zip_state.md
dbdoc/tiger.zip_state_loc.md
dbdoc/tiger.cousub.md
dbdoc/tiger.edges.md
dbdoc/tiger.addrfeat.md
dbdoc/tiger.faces.md
dbdoc/tiger.featnames.md
dbdoc/tiger.addr.md
dbdoc/tiger.zcta5.md
dbdoc/tiger.loader_platform.md
dbdoc/tiger.loader_variables.md
dbdoc/tiger.loader_lookuptables.md
dbdoc/tiger.tract.md
dbdoc/tiger.tabblock.md
dbdoc/tiger.bg.md
dbdoc/tiger.pagc_gaz.md
dbdoc/tiger.pagc_lex.md
dbdoc/tiger.pagc_rules.md
dbdoc/public.test_table.md |
Hi @k1LoW, thank you for trying to reproduce this so thoroughly. It indeed does work from a fresh installation. It might be the default, but you need to also create the topology extension: CREATE EXTENSION IF NOT EXISTS postgis_topology Nevertheless, I've found the culprit and difference, my current database has this search path: foobar> SHOW search_path;
+---------------------------+
| search_path |
|---------------------------|
| "$user", public, topology |
+---------------------------+ After changing the search_path for this database with: ALTER ROLE dbuser in DATABASE foobar SET search_path TO "$user",public; (You will need to restart database connections to apply changes) It works! Details$ tbls doc
docs/schema/schema.png
docs/schema/public.spatial_ref_sys.png
docs/schema/public.geography_columns.png
docs/schema/public.geometry_columns.png
docs/schema/public.raster_columns.png
docs/schema/public.raster_overviews.png
docs/schema/topology.topology.png
docs/schema/topology.layer.png
docs/schema/public.migration.png
docs/schema/public.user.png
docs/schema/public.user_role.png
docs/schema/public.users_homes.png
docs/schema/public.users_roles.png
docs/schema/public.users_tokens.png
docs/schema/public.subscriber.png
docs/schema/README.md
docs/schema/public.spatial_ref_sys.md
docs/schema/public.geography_columns.md
docs/schema/public.geometry_columns.md
docs/schema/public.raster_columns.md
docs/schema/public.raster_overviews.md
docs/schema/topology.topology.md
docs/schema/topology.layer.md
docs/schema/public.migration.md
docs/schema/public.user.md
docs/schema/public.user_role.md
docs/schema/public.users_homes.md
docs/schema/public.users_roles.md
docs/schema/public.users_tokens.md
docs/schema/public.subscriber.md I'm not sure (1) how I ended up with this weird But bottom-line it seems that Beside this "bug", maybe it would be a nice idea adding a |
I was able to reproduce the bug thanks to your advice ! https://github.com/k1LoW/tbls/runs/507899665?check_suite_focus=true |
Released as v1.28.3. |
Thanks @k1LoW, works great! |
Oh... I mistake.. |
Released as v1.29.1. Thank you for your comment ! |
What happened
$ tbls doc not found table 'public.topology'
Seems related to #28 and #153
You can reproduce with docker image
mdillon/postgis:9.5
What you expected to happed
I expected a generated documentation.
What stacktrace or error message from tbls did you see?
Anything else we need to know?
PostGIS is enabled and manages the
topology
schema. This is the output of\dt
:Environment
tbls version
: 1.28.2USE_GEOS=1 USE_PROJ=1 USE_STATS=1
.tbls.yml
:Stacktrace
The text was updated successfully, but these errors were encountered: