In the documentation of ALTER TABLE ... ATTACH PARTITION its implicit that partition name specified should be the name of the existing table being attached. Same is the case with DETACH PARTITION where its implicit that the detached partition becomes a stand-alone table with same name as the partition being detached. I think this needs to be more explicit. PFA patch on those lines.
-- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers