WillAyd commented on code in PR #2219:
URL: https://github.com/apache/arrow-adbc/pull/2219#discussion_r1822994833


##########
c/driver/postgresql/connection.cc:
##########
@@ -478,19 +479,35 @@ AdbcStatusCode PostgresConnection::GetInfo(struct 
AdbcConnection* connection,
   for (size_t i = 0; i < info_codes_length; i++) {
     switch (info_codes[i]) {
       case ADBC_INFO_VENDOR_NAME:
-        infos.push_back({info_codes[i], "PostgreSQL"});
+        if (RedshiftVersion()[0] > 0) {
+          infos.emplace_back(info_codes[i], "Redshift");
+        } else {
+          infos.push_back({info_codes[i], "PostgreSQL"});

Review Comment:
   C++...what a language.
   
   Well in this case either is likely fine. I am under the impression that 
emplace_back would avoid any calls to the copy constructor of the list element, 
along with any move constructors that need to be called when the vector is 
resized. In this particular case it probably doesn't make a difference; maybe 
something to just look at when performance is more critical



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to