-
Notifications
You must be signed in to change notification settings - Fork 609
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
feat: a lot of tables listed by default in Postgres #8763
Comments
Can you try out my no schema branch? I think I fixed this over there |
mostly fixed! down to 3: [ins] In [1]: import ibis
[ins] In [2]: con = ibis.postgres.connect(host="localhost", user="postgres", password="postgres", database="ibis_testing")
[ins] In [3]: con.list_tables()
Out[3]: ['geography_columns', 'geometry_columns', 'spatial_ref_sys'] if it's possible/you want to remove those you can leave this open, or perhaps just mark your PR as closing this issue? |
I'll self-assign this and tackle it as a followup after #8655 is merged. |
Hmm, well, I'm not sure what to do about those tables -- it's two views and one table and they are in the
We can add special handling to remove them from the output of |
IMO I think the optimal behavior for "system" tables like these would be:
Filtering them from |
Currently on the kill-schema branch, if no catalog or database is provided, we use the default values of I think filtering out the above system tables for a "clean" Do we want to be less prescriptive if the user is explicitly asking for things in e.g. do we want something like this? ( I genuinely don't know -- I think I don't like this but I'm waffling) >>> con.list_tables()
[]
>>> con.list_tables(database=("ibis_testing", "public"))
['geography_columns', 'geometry_columns', 'spatial_ref_sys'] |
I think if we consider non-system tables to be any table that wasn't created by postgres itself, that was created using a |
I think we should be uniform in how we're filtering, so if "system" tables can appear in other databases/catalogs then we should also filter there. I could also go with Phillip's definition of system tables above, although I think the geo-extension is common enough (and creates some known tables) so special-casing and excluding those here also seems fine to me. |
It seems like extension tables are probably placed into the public schema for a reason, so listing them doesn't strike me as a horrible choice |
Postgres' default behavior is not as simple as "look in |
from a UX perspective, I mainly just want to easily see the tables I create in the database. that's hard with 247 but fine with 3 in there by default. no strong opinion from me on whether those 3 should be listed or not but it's fine for my use cases at least |
I vote don't do anything clever, show everything in public. If you don't want clutter (which is reasonable) then this should get fixed at the geospatial extension level. |
Ok, I'm going set #8655 to close this |
Is your feature request related to a problem?
a lot (247) of tables are listed in
con.list_tables()
for a default postgres connection after runningjust up postgres
:most of these seem to be system tables (though I'm not that familiar w/ Postgres details):
See all tables
Describe the solution you'd like
if possible, avoid listing system tables
What version of ibis are you running?
main
What backend(s) are you using, if any?
Postgres; would be nice to do this for others if it applies
Code of Conduct
The text was updated successfully, but these errors were encountered: