3 ms·
Why wouldn't you be able to query tables/views in multiple schemas?
by joevandyk 12y ago
Why wouldn't you be able to query tables/views in multiple schemas?
- rpedela 12y agoYou can. I didn't say you couldn't absolutely, rather there are cases where you can't. Using the schema search path and/or joining multiple tables into a view allows you to query multiple schemas. The internal schema and relation structure doesn't matter. But since this tool takes over setting the schema for versioning at the API level, the end result is that, from the API's point of view, there is only one schema in the database. My question remains, how do I expose multiple schemas in the REST API? I certainly could have missed something, but it doesn't seem like it is possible to expose multiple schemas in the REST API itself. This tool seems more geared toward providing a public REST API where the data happens to be stored in Postgres rather than a more generic REST API for Postgres. I would like the latter, but if that isn't the goal then that is okay.
- joevandyk 12y agoI'm not exactly sure what you mean by "expose multiple schemas in the REST API" - you mean pg schemas or how the API is structured? (I wish pg named schemas "namespaces" or something else, schema is an overloaded term)
- rpedela 12y agoYes I agree with using the term namespace instead of PG schema. I have also never understood why the default schema (namespace) is called "public". Why not "default"? Anyway let us say how do I expose multiple namespaces in the REST API?