On Thu, Aug 16, 2018 at 12:46 AM Pavel Stehule <pavel.steh...@gmail.com> wrote:
> čt 16. 8. 2018 v 5:52 odesílatel Mathias Brossard <postgre...@zoinx.org> > napsal: > >> I do have a feedback on the implementation. The code tries to support >> older PostgreSQL server versions when declarative partitions were not >> supported before version 10 (relkind value of 'p'). Those versions will >> never return any result from the query being built. So I would suggest an >> early return from the function. The upside would be that the query building >> would be simpler. I can make patch implementing that suggestion if you want. >> > > This is question - maybe we can support older partitioning based on only > inheritance - and the query can be more exact on PostgreSQL 10 and newer. > > Please, send any patch. You are welcome. > In my very humble opinion, I would restrict the definition of partitions to declarative partitioning. My justification would be that partitions all use inheritance, but not all inheritance is a partition (how would you handle multiple inheritance). See patch attached that fails (in a way similar to other features) when connected to servers with version earlier than 10.0. Sincerely, -- Mathias Brossard
psql-dP-10+only.patch
Description: Binary data