Skip to content

Reload types on unknown oid during prepare#317

Merged
fishcakez merged 6 commits intomasterfrom
jf-reboot-live
May 31, 2017
Merged

Reload types on unknown oid during prepare#317
fishcakez merged 6 commits intomasterfrom
jf-reboot-live

Conversation

@fishcakez
Copy link
Copy Markdown
Member

@fishcakez fishcakez commented May 29, 2017

Closes #243. This is WIP.

  • Add more tests
  • Log reload

@mspanc can you check if this branch resolves your issue?

Comment thread lib/postgrex/protocol.ex
bootstrap_send(s, status, types, parameters, buffer, &bootstrap_sync_recv/3)
end

defp bootstrap_send(s, status, types, parameters, buffer, next) do
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function takes too many parameters (arity is 6, max is 5).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Chill.

Comment thread test/alter_test.exs Outdated
{:ok, pid} = Postgrex.start_link(context[:options])
assert %Postgrex.Result{num_rows: 1} = Postgrex.query!(pid, "INSERT INTO missing_oid VALUES ($1, $2)", ["missing", {1,2}])
assert %Postgrex.Result{rows: [["missing", {1,2}]]} = Postgrex.query!(pid, "SELECT a,b FROM missing_oid", [])
assert :ok = query("INSERT INTO missing_oid VALUES ($1, $2)", ["missing", {1,2}])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Space missing after comma

@sourcelevel-bot
Copy link
Copy Markdown

Ebert has finished reviewing this Pull Request and has found:

  • 172 possible new issues (including those that may have been commented here).

But beware that this branch is 4 commits behind the elixir-ecto:master branch, and a review of an up to date branch would produce more accurate results.

You can see more details about this review at https://ebertapp.io/github/elixir-ecto/postgrex/pulls/317.

@fishcakez
Copy link
Copy Markdown
Member Author

This is ready to go.

@josevalim
Copy link
Copy Markdown
Member

Beautiful! I love the new tests! ❤️ 💚 💙 💛 💜

@fishcakez
Copy link
Copy Markdown
Member Author

Oh the tests can't use range because it requires 9.2

range requires postgresql 9.2
@fishcakez fishcakez merged commit 2c026cb into master May 31, 2017
@fishcakez fishcakez deleted the jf-reboot-live branch May 31, 2017 11:20
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.

Reload oid types when a new type is detected

2 participants