News for hackers. Stuff that matters.
Re:Automatic REST API for Any Postgres Database by joevandyk on Saturday January 03, 2015 @05:50PM (#8832374)
Why wouldn't you be able to query tables/views in multiple schemas?
Re:Automatic REST API for Any Postgres Database by rpedela on Saturday January 03, 2015 @07:34PM (#8832665)
You 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.

Re:Automatic REST API for Any Postgres Database by joevandyk on Saturday January 03, 2015 @07:38PM (#8832676)
I'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)

Re:Automatic REST API for Any Postgres Database by rpedela on Saturday January 03, 2015 @07:45PM (#8832695)
Yes 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?