Skip to content

Postgres#62

Open
dietmarkuehl wants to merge 5 commits into
mainfrom
postgres
Open

Postgres#62
dietmarkuehl wants to merge 5 commits into
mainfrom
postgres

Conversation

@dietmarkuehl

Copy link
Copy Markdown
Member

adding presentation code

Copilot AI review requested due to automatic review settings June 17, 2026 15:11
@dietmarkuehl dietmarkuehl requested a review from camio as a code owner June 17, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds additional Postgres “talk” example programs under examples/ and updates the Postgres examples CMake wiring to build them when Postgres is available.

Changes:

  • Updated postgres-talk.cpp with revised pg::exec error handling/logging and a refactored mutex sender wrapper usage in main().
  • Added two new presentation-oriented variants: postgres-talk-accuonsea.cpp and postgres-talk-c++now.cpp.
  • Extended examples/CMakeLists.txt to build the new Postgres talk examples when HAS_POSTGRES is enabled.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
examples/postgres-talk.cpp Refactors the Postgres async query path and example orchestration.
examples/postgres-talk-c++now.cpp Adds an additional Postgres talk example variant.
examples/postgres-talk-accuonsea.cpp Adds another Postgres talk example variant based on the updated approach.
examples/CMakeLists.txt Registers the new examples in the build when Postgres is present.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 66 to 69
if (!PQsendQuery(conn, query.c_str())) {
co_yield ex::with_error(pg::error(PQerrorMessage(conn)));
std::cout << "ERROR: " << PQerrorMessage(conn) << "\n";
throw std::runtime_error("ERROR");
}
Comment on lines 79 to 81
if (!PQconsumeInput(conn)) {
co_yield ex::with_error(pg::error(PQerrorMessage(conn)));
// error handling
}
}
}
co_return std::move(res);
co_return res;
@@ -0,0 +1,214 @@
// examples/postgres-talk.cpp -*-C++-*-
Comment on lines +66 to +69
if (!PQsendQuery(conn, query.c_str())) {
std::cout << "ERROR: " << PQerrorMessage(conn) << "\n";
throw std::runtime_error("ERROR");
}
Comment on lines +79 to +81
if (!PQconsumeInput(conn)) {
// error handling
}
break;
}
}
co_return res;
@@ -0,0 +1,217 @@
// examples/postgres-talk.cpp -*-C++-*-
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