Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ jobs:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake

steps:
- name: Free disk space 1
uses: endersonmenezes/free-disk-space@v2.1.1
continue-on-error: true
with:
# remove_android: true # ~9.5GB in #52s
# remove_dotnet: true
remove_haskell: true # ~6.5GB in ~3s
remove_tool_cache: true # ~4.8GB in ~17s
# remove_swap: true
# remove_packages_one_command: true # ~7.5 GB in ~94s
testing: false

- name: Install required ubuntu packages
run: |
sudo apt-get update -y -qq
Expand Down
2 changes: 1 addition & 1 deletion src/include/postgres_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace duckdb {

enum class PostgresInstanceType { UNKNOWN, POSTGRES, AURORA };
enum class PostgresInstanceType { UNKNOWN, POSTGRES, AURORA, REDSHIFT };

struct PostgresVersion {
PostgresVersion() {
Expand Down
6 changes: 5 additions & 1 deletion src/postgres_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ PostgresVersion PostgresConnection::GetPostgresVersion() {
version.type_v = PostgresInstanceType::UNKNOWN;
return version;
}
auto version = PostgresUtils::ExtractPostgresVersion(result->GetString(0, 0));
auto pg_version_string = result->GetString(0, 0);
auto version = PostgresUtils::ExtractPostgresVersion(pg_version_string);
if (result->GetInt64(0, 1) > 0) {
version.type_v = PostgresInstanceType::AURORA;
}
if (StringUtil::Contains(pg_version_string, "Redshift")) {
version.type_v = PostgresInstanceType::REDSHIFT;
}
return version;
}

Expand Down
3 changes: 3 additions & 0 deletions src/postgres_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ void PostgresScanFunction::PrepareBind(PostgresVersion version, ClientContext &c
}
bind_data.SetTablePages(approx_num_pages);
bind_data.version = version;
if (version.type_v == PostgresInstanceType::REDSHIFT) {
bind_data.use_text_protocol = true;
}
}

PostgresBindData::PostgresBindData(ClientContext &context) {
Expand Down
Loading