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

Use db.Conn to fix postgres lock/unlock #4

Closed
wants to merge 1 commit into from
Closed

Use db.Conn to fix postgres lock/unlock #4

wants to merge 1 commit into from

Conversation

chrisaxiom
Copy link

Hello @dhui , I would also like this one if possible merged in.

Thanks!

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

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

Conflicts need to be resolved

@@ -33,7 +35,8 @@ type Config struct {
}

type Postgres struct {
db *sql.DB
// Locking and unlocking need to use the same connection
db *sql.Conn
Copy link
Member

Choose a reason for hiding this comment

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

Rename db to conn

@@ -1,3 +1,4 @@
// +build go1.9
Copy link
Member

Choose a reason for hiding this comment

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

We need to support Go 1.8 until Go 1.10 is released in Feb 2018

So we can either:

  1. Wait until Go 1.10 is release and we can drop Go 1.8 support and remove this build tag
  2. Or have a separate implementation of postgres.go which supports Go 1.8. See net/context for an example of a package supporting multiple Go versions

@chrisaxiom
Copy link
Author

I will perhaps remake this PR myself with another file for 1.9. This is not my branch so I am actually unsure how to resolve the conflicts anyways. I will incorporate your request to rename db to conn as well. Thanks for the quick response!

@chrisaxiom chrisaxiom closed this Jan 24, 2018
dhui added a commit that referenced this pull request Feb 21, 2018
@dhui
Copy link
Member

dhui commented Feb 21, 2018

Fixed in release v3.2.0

FPiety0521 pushed a commit to FPiety0521/Golang-SQL that referenced this pull request May 24, 2023
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.

3 participants