Closed darkhelmet closed 2 years ago
Hi, thanks for a proposal. Yeah, I think it will be a beneficial change. Can you submit a PR? I think the simplest way to implement it would be to make schemaname
configurable using a query args
and leave the default value at public
. You'd need to add correct DEFAULT_ARGS
values for all the queries that use schema.
Didn't really have a better title for this but...
I've started building out a feature in our application that uses multiple schemas. This means, that when I later use
rails-pg-extras
andRailsPGExtras.index_usage
I get indexes for materialized views I've created in this other schema. Since the views I'm creating have the same name as tables in the public schema, I'll get duplicate entries forusers
, for example. The output doesn't include the schema name so I don't get that information and can't pick the correct version of the index I care about.Basically, the end goal is I want to include only the public schema for
index_usage
, and basically anything else that would include things in multiple schemas. So either I need to be able to customize the query, or get more information from the query so I can ignore it later on, or something else. I'm open to suggestions. I could fork the gem, but this seems like something that could be useful for other people.Ideas? I can make a PR if there's some direction you think would be best.