On Tue, Dec 04, 2018 at 03:41:59PM -0300, Alvaro Herrera wrote: > I spent a few minutes trying to think of a way of determining which > query to use at SQL-execution time -- two CTEs, one of which would be > short-circuited ... but I couldn't figure out how. I also tried to use > the new pg_partition_tree() function, but it's useless for this purpose > because it roots at its argument table, and there doesn't seem to be a > convenient way to obtain the topmost ancestor.
This has been mentioned on the thread where pg_partition_tree has been discussed: https://www.postgresql.org/message-id/6baeb45a-6222-6b88-342d-37fc7d3cf89a%40lab.ntt.co.jp It got shaved from the final patch for simplicity as we had enough issues to deal with first. Adding a pg_partition_root or a new column in pg_partition_tree makes sense. My guts are telling me that a separate function is more instinctive to use. -- Michael
signature.asc
Description: PGP signature