News for hackers. Stuff that matters.
Re:Show HN: Hasura – A Postgres BaaS and Kubernetes PaaS on ... by ruslan_talpa on Friday February 24, 2017 @11:16PM (#13730017)
all the things i explained about metadata are implemented in postgrest and they work, and there is no loss of flexibility sinceyou can expose any table you want from any schema by explicitly creating a "mirror" view in the exposed schema. and relations are detected across tables and views and there is a way to deal with collisions. I am not saying that your way is bad (having a metadata file), just saying there is a way to automatically create it.

- b,c that's good that you don't expose the entire SQL

Re:Show HN: Hasura – A Postgres BaaS and Kubernetes PaaS on ... by 0x777 on Friday February 24, 2017 @11:32PM (#13730067)
I guess we'll need to have 'auto generate relationships' tooling. Just curious, how do you infer the relationships between a table and a view?
Re:Show HN: Hasura – A Postgres BaaS and Kubernetes PaaS on ... by ruslan_talpa on Friday February 24, 2017 @11:41PM (#13730096)
can't reply to your question so doing it here. the code is OS so you can look it up :) the idea is this - detect table relations based on FK - for each view check where each column comes from (view column usage) based on the info above you know all the relations in the system, even view to view

also there is a way to do it in a single query but that is not yet implemented in postgrest

Re:Show HN: Hasura – A Postgres BaaS and Kubernetes PaaS on ... by 0x777 on Saturday February 25, 2017 @01:28AM (#13730375)
While we can get the information on the columns used in a view, we can't infer if the uniqueness properties propagate to the view which guarantee the semantics of relationships.

I guess it might be convenient to do this (determine relationships across views), but the users should be aware of the guarantees offered in this scenario.

Re:Show HN: Hasura – A Postgres BaaS and Kubernetes PaaS on ... by ruslan_talpa on Saturday February 25, 2017 @01:49AM (#13730439)
I am not sure i understand what you are saying about guarantees. If there is a FK, there is a relation. It's the user that is driving the relations by specifying what columns are FK, it's the same thing as defining relations in a GUI, only you do it at the database level