-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix PostgreSQL Metadata Source Tests #9
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"string": "cpp" | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,7 +252,7 @@ absl::Status PostgreSQLMetadataSource::ConnectImpl() { | |
MLMD_RETURN_IF_ERROR(databaseExistenceStatus); | ||
if (record_set.records_size() == 0) { | ||
const std::string create_database_cmd = | ||
absl::Substitute("CREATE DATABASE $0;", config_.dbname().data()); | ||
absl::Substitute("CREATE DATABASE \"$0\";", config_.dbname().data()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC, and also from the PR description, this fixes DB creation for names containing a "-", as you also raised on a previous meeting. IIRC we also need that fix on the MySQL metadata source |
||
PGresult* res = PQexec(connDefault, create_database_cmd.c_str()); | ||
if (PQresultStatus(res) != PGRES_COMMAND_OK && | ||
PQresultStatus(res) != PGRES_TUPLES_OK) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you could squash this change to keep the PR cleaner.