Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix postgres extensible text #1601

Merged
merged 2 commits into from
Aug 9, 2016
Merged

Fix postgres extensible text #1601

merged 2 commits into from
Aug 9, 2016

Conversation

phemmer
Copy link
Contributor

@phemmer phemmer commented Aug 8, 2016

Required for all PRs:

  • CHANGELOG.md updated
  • Sign CLA (if not already signed)

Fixes #1600

I also did some code cleanup on the nearby code so that it better follows golang coding standards (type switching & less nesting).

case []byte:
tags[col] = string(v)
case int64:
tags[col] = fmt.Sprintf("%d", v)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea why the code only supported []byte and int64 tags (though I suspect this is another bug), so I left it as is.

@phemmer
Copy link
Contributor Author

phemmer commented Aug 8, 2016

Build failure appears unrelated to the changes in this PR as this PR does not touch the failing plugin, or any code the plugin uses:

2016/08/08 06:49:38 subject: telegraf, error: unable to parse 'cpu_load_short,host=server01 1422568543702900257': invalid field format
--- FAIL: TestRunParserAndGather (0.03s)
    Error Trace:    accumulator.go:188
            nats_consumer_test.go:83
    Error:      unknown measurement cpu_load_short


FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/nats_consumer 0.154s

@sparrc
Copy link
Contributor

sparrc commented Aug 9, 2016

thanks @phemmer

@sparrc sparrc merged commit 53e31cf into influxdata:master Aug 9, 2016
aurrelhebert pushed a commit to aurrelhebert/telegraf that referenced this pull request Aug 9, 2016
* convert postgresql_extensible byte slice values to strings

* code cleanup in postgresql_extensible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants