{"action":"created","issue":{"url":"https://api.github.com/repos/pgpartman/pg_partman/issues/228","repository_url":"https://api.github.com/repos/pgpartman/pg_partman","labels_url":"https://api.github.com/repos/pgpartman/pg_partman/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/pgpartman/pg_partman/issues/228/comments","events_url":"https://api.github.com/repos/pgpartman/pg_partman/issues/228/events","html_url":"https://github.com/pgpartman/pg_partman/issues/228","id":357725509,"node_id":"MDU6SXNzdWUzNTc3MjU1MDk=","number":228,"title":"Need correlation name for upsert conditional","user":{"login":"snhirsch","id":15849809,"node_id":"MDQ6VXNlcjE1ODQ5ODA5","avatar_url":"https://avatars0.githubusercontent.com/u/15849809?v=4","gravatar_id":"","url":"https://api.github.com/users/snhirsch","html_url":"https://github.com/snhirsch","followers_url":"https://api.github.com/users/snhirsch/followers","following_url":"https://api.github.com/users/snhirsch/following{/other_user}","gists_url":"https://api.github.com/users/snhirsch/gists{/gist_id}","starred_url":"https://api.github.com/users/snhirsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snhirsch/subscriptions","organizations_url":"https://api.github.com/users/snhirsch/orgs","repos_url":"https://api.github.com/users/snhirsch/repos","events_url":"https://api.github.com/users/snhirsch/events{/privacy}","received_events_url":"https://api.github.com/users/snhirsch/received_events","type":"User","site_admin":false},"labels":[{"id":13205262,"node_id":"MDU6TGFiZWwxMzIwNTI2Mg==","url":"https://api.github.com/repos/pgpartman/pg_partman/labels/wontfix","name":"wontfix","color":"000000","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-06T16:06:33Z","updated_at":"2018-09-06T20:35:24Z","closed_at":null,"author_association":"NONE","body":"I have a situation where I'd like to specify a p_upsert clause using a WHERE.. qualifier that compares values between EXCLUDED and current columns.  Syntactically, this is only possible by prefixing the target column idenifier with either the full table name or a correlation name defined using 'AS blah'.  Problem is, the generated trigger has no correlation variable and the name of the table will vary by partition!  \r\n\r\nMy only option seems to be to dump the trigger source, hand-edit it and replace the generated trigger.  Am I missing a simpler workaround?\r\n\r\nIn any event, would you consider coding an ehancement to add a correlation variable to each upsert statement when generating the trigger?"},"comment":{"url":"https://api.github.com/repos/pgpartman/pg_partman/issues/comments/419232389","html_url":"https://github.com/pgpartman/pg_partman/issues/228#issuecomment-419232389","issue_url":"https://api.github.com/repos/pgpartman/pg_partman/issues/228","id":419232389,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTIzMjM4OQ==","user":{"login":"keithf4","id":825402,"node_id":"MDQ6VXNlcjgyNTQwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/825402?v=4","gravatar_id":"","url":"https://api.github.com/users/keithf4","html_url":"https://github.com/keithf4","followers_url":"https://api.github.com/users/keithf4/followers","following_url":"https://api.github.com/users/keithf4/following{/other_user}","gists_url":"https://api.github.com/users/keithf4/gists{/gist_id}","starred_url":"https://api.github.com/users/keithf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithf4/subscriptions","organizations_url":"https://api.github.com/users/keithf4/orgs","repos_url":"https://api.github.com/users/keithf4/repos","events_url":"https://api.github.com/users/keithf4/events{/privacy}","received_events_url":"https://api.github.com/users/keithf4/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T20:35:24Z","updated_at":"2018-09-06T20:35:24Z","author_association":"COLLABORATOR","body":"I'm really not sure. If you can possibly provide me a use-case example I can look into it."}}
{"actor":{"display_login":"keithf4"}}