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

encode: decode T_text into a string #436

Merged
merged 1 commit into from
Jun 22, 2016
Merged

encode: decode T_text into a string #436

merged 1 commit into from
Jun 22, 2016

Conversation

tamird
Copy link
Collaborator

@tamird tamird commented Feb 11, 2016

This allows the caller to distinguish strings from byte arrays.

@johto
Copy link
Contributor

johto commented Feb 11, 2016

I had explained in some issue why we're not allowed to do this, but I can't find it anymore. The only thing I could find was cbandy's comment at the end of #300.

@tamird
Copy link
Collaborator Author

tamird commented Feb 12, 2016

Well, per https://go-review.googlesource.com/#/c/19439/ this isn't going anywhere.

@tamird tamird closed this Feb 12, 2016
@tamird tamird deleted the decode-string branch February 12, 2016 06:12
@tamird tamird restored the decode-string branch February 12, 2016 06:12
@tamird tamird deleted the decode-string branch February 12, 2016 16:24
@tamird tamird restored the decode-string branch March 23, 2016 07:05
@tamird tamird reopened this Mar 23, 2016
@tamird
Copy link
Collaborator Author

tamird commented Mar 23, 2016

Reopened as an alternative to #300 now that https://go-review.googlesource.com/#/c/19439/ is merged in golang/go@7162c4d.

@tamird
Copy link
Collaborator Author

tamird commented May 21, 2016

@johto ping!

@cbandy
Copy link
Contributor

cbandy commented May 21, 2016

Excellent. We should not forget the other character types. As we make this transition (or maybe before?) we should probably tackle #404, so we can point to the docs if/when users notice this change.

Based on comments in the CL, it looks like the change to database/sql will be in Go1.7, yes? Is there any reason/desire for us to keep the current/pre-Go1.7 behavior available?

@tamird
Copy link
Collaborator Author

tamird commented May 22, 2016

I'll take a look at #404 when I have more time, but I don't see any reason
for it to precede this (in fact, doing this first will reduce churn).

As for persevering the old behavior - I don't think there's any reason to
do so. It's easy enough to work around by scanning directly into a byte
array or casting (and it's just as much work as changing existing user code
to use a legacy API).
On May 21, 2016 12:40 AM, "Chris Bandy" [email protected] wrote:

Excellent. We should not forget the other character types
http://www.postgresql.org/docs/current/static/datatype-character.html.
As we make this transition (or maybe before?) we should probably tackle
#404 #404, so we can point to the docs
if/when users notice this change.

Based on comments in the CL, it looks like the change to database/sql
will be in Go1.7, yes? Is there any reason/desire for us to keep the
current/pre-Go1.7 behavior available?


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#436 (comment)

@tamird
Copy link
Collaborator Author

tamird commented Jun 17, 2016

@uhoh-itsmaciek could you take a look at this one? the upstream change was a documentation change, so while it will be included in 1.7, it should be safe to merge this even for use in versions prior to 1.7.

@msakrejda
Copy link
Contributor

@tamird sure, but I won't have time for it till next week.

@freeformz
Copy link

@tamird How about T_varchar & T_char ?

@tamird
Copy link
Collaborator Author

tamird commented Jun 20, 2016

seems reasonable to add those. Done.

This allows the caller to distinguish strings from byte arrays.
@tamird
Copy link
Collaborator Author

tamird commented Jun 20, 2016

@uhoh-itsmaciek this is green and ready for another look, when you get a chance.

@freeformz
Copy link

LGTM

@msakrejda
Copy link
Contributor

Looks good. Thanks!

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.

5 participants