News for hackers. Stuff that matters.
Re:Common mistakes in PostgreSQL by gigatexal on Friday May 03, 2019 @01:24PM (#19820314)
You had views dependent on views? Object oriented database schemes sound problematic.
Re:Common mistakes in PostgreSQL by radiowave on Friday May 03, 2019 @03:18PM (#19821399)
Nothing to do with object orientation. We just use a lot of views, both to abstract away common complex queries, and to allow external systems to interact with the data in a controlled way.
Re:Common mistakes in PostgreSQL by gigatexal on Saturday May 04, 2019 @02:12AM (#19824758)
That makes sense actually. But stored procedures could do that too?
Re:Common mistakes in PostgreSQL by radiowave on Saturday May 04, 2019 @05:22AM (#19825368)
Yes. I tend to treat procedural code as a last resort, because pure declarative SQL is so much easier to troubleshoot.
Re:Common mistakes in PostgreSQL by gigatexal on Saturday May 04, 2019 @01:57PM (#19828043)
I guess I use stored procedures differently. I rely on SQL queries not for loops if I can help it. Sometimes it can’t be avoided if you’re doing updates in chunks for example.