{"action":"created","issue":{"url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/54","repository_url":"https://api.github.com/repos/postgrespro/pg_pathman","labels_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/54/comments","events_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/54/events","html_url":"https://github.com/postgrespro/pg_pathman/issues/54","id":186696800,"number":54,"title":"reasonable names for partitions","user":{"login":"megadawn","id":23202587,"avatar_url":"https://avatars.githubusercontent.com/u/23202587?v=3","gravatar_id":"","url":"https://api.github.com/users/megadawn","html_url":"https://github.com/megadawn","followers_url":"https://api.github.com/users/megadawn/followers","following_url":"https://api.github.com/users/megadawn/following{/other_user}","gists_url":"https://api.github.com/users/megadawn/gists{/gist_id}","starred_url":"https://api.github.com/users/megadawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megadawn/subscriptions","organizations_url":"https://api.github.com/users/megadawn/orgs","repos_url":"https://api.github.com/users/megadawn/repos","events_url":"https://api.github.com/users/megadawn/events{/privacy}","received_events_url":"https://api.github.com/users/megadawn/received_events","type":"User","site_admin":false},"labels":[{"id":331165786,"url":"https://api.github.com/repos/postgrespro/pg_pathman/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-02T02:24:46Z","updated_at":"2016-11-02T14:59:45Z","closed_at":null,"body":"Hi,\r\nIs there any way to name created partitions? I mean not just table_1234, but table_2016_11_02?\r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/comments/257890544","html_url":"https://github.com/postgrespro/pg_pathman/issues/54#issuecomment-257890544","issue_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/54","id":257890544,"user":{"login":"funbringer","id":3599598,"avatar_url":"https://avatars.githubusercontent.com/u/3599598?v=3","gravatar_id":"","url":"https://api.github.com/users/funbringer","html_url":"https://github.com/funbringer","followers_url":"https://api.github.com/users/funbringer/followers","following_url":"https://api.github.com/users/funbringer/following{/other_user}","gists_url":"https://api.github.com/users/funbringer/gists{/gist_id}","starred_url":"https://api.github.com/users/funbringer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funbringer/subscriptions","organizations_url":"https://api.github.com/users/funbringer/orgs","repos_url":"https://api.github.com/users/funbringer/repos","events_url":"https://api.github.com/users/funbringer/events{/privacy}","received_events_url":"https://api.github.com/users/funbringer/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T14:59:45Z","updated_at":"2016-11-02T14:59:45Z","body":"hi @megadawn,\r\n\r\nThere're al least two ways to do that:\r\n* Manually set name using the default argument `partition_name TEXT` taken by most functions\r\n```plpgsql\r\n/* create new table with 0 partitions */\r\ncreate table test(val int not null);\r\nselect create_range_partitions('test', 'val', 1, 10, 0);\r\n\r\n/* add new range partition 'test_part' [1, 10) */\r\nselect add_range_partition('test', 1, 10, 'test_part');\r\n\r\n/* show a plan (parent is automatically excluded) */\r\nexplain (costs off) select * from test;\r\n         QUERY PLAN          \r\n-----------------------------\r\n Append\r\n   ->  Seq Scan on test_part\r\n(2 rows)\r\n```\r\n* Create a partition initialization callback and register it using the `set_init_callback()`. You'll be able to change partition's name and other properties however you like."}}
{"actor":{"display_login":"funbringer"}}