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

Hang on pg #98

Closed
akzhan opened this issue Jun 9, 2017 · 2 comments
Closed

Hang on pg #98

akzhan opened this issue Jun 9, 2017 · 2 comments

Comments

@akzhan
Copy link

akzhan commented Jun 9, 2017

@bcardiff
From a nasty puts debugging the call to PQ::Connection.read_next_row_start assigns 'E' instead of 'D' probably (?) in type = soc.read_char

I haven't go any further than this.

require "pg"

`psql -c "DROP DATABASE IF EXISTS issue_db_46"`
`createdb issue_db_46`
`psql -d issue_db_46 -c "CREATE TABLE users (name varchar(50), CONSTRAINT key_name UNIQUE(name));"`
`psql -d issue_db_46 -c "INSERT INTO users (name) VALUES ('test');"`

db = DB.open("postgres://localhost/issue-db-46")

puts "A"

db.query "INSERT INTO users (name) VALUES ($1) RETURNING *", "test" do |rs|
  rs.move_next
end

puts "Z"

db.close

Related to crystal-lang/crystal-db#46 and Crecto/crecto#76.

@bigtunacan
Copy link
Contributor

@will this issue can be closed. It's fixed by PR #100

@will
Copy link
Owner

will commented Jun 24, 2017

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

No branches or pull requests

3 participants