It is possible in PostgreSQL 11 to display the partition table for each row in the table? Well, it's clear that the assignment of partitions is always known by the declarative definition but is there any way to get this information programmatically?
1 Answer 1
This is possible by using the system column tableoid
:
select *, tableoid::regclass as partition_name
from the_table;
answered Nov 29, 2019 at 13:07
user1822user1822
lang-sql