Skip to content

psqlodbc2 CI - Add ODBC descriptor handles and array/batch parameter binding Implement the ODBC 3.x descriptor model and array parameter binding, bringing the upstream regression suite from 46/60 to 50/60 with no regressions. Newly passing: descrec, descriptors-free, arraybinding, params-batch-exec. Descriptor handles (src/descriptor.c/.h): - Full ARD/APD/IRD/IPD model: four implicit descriptors per statement (app row, app param, impl row, impl param). - SQLGetDescRec@52 / SQLSetDescRec@53 read/write... #16

psqlodbc2 CI - Add ODBC descriptor handles and array/batch parameter binding Implement the ODBC 3.x descriptor model and array parameter binding, bringing the upstream regression suite from 46/60 to 50/60 with no regressions. Newly passing: descrec, descriptors-free, arraybinding, params-batch-exec. Descriptor handles (src/descriptor.c/.h): - Full ARD/APD/IRD/IPD model: four implicit descriptors per statement (app row, app param, impl row, impl param). - SQLGetDescRec@52 / SQLSetDescRec@53 read/write...

psqlodbc2 CI - Add ODBC descriptor handles and array/batch parameter binding Implement the ODBC 3.x descriptor model and array parameter binding, bringing the upstream regression suite from 46/60 to 50/60 with no regressions. Newly passing: descrec, descriptors-free, arraybinding, params-batch-exec. Descriptor handles (src/descriptor.c/.h): - Full ARD/APD/IRD/IPD model: four implicit descriptors per statement (app row, app param, impl row, impl param). - SQLGetDescRec@52 / SQLSetDescRec@53 read/write... #16

Workflow file for this run

name: CI
run-name: psqlodbc2 CI - ${{ github.event.head_commit.message }}
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux (Ubuntu)
- os: macos-latest
name: macOS
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
services:
postgres:
image: ${{ matrix.os == 'ubuntu-latest' && 'postgres:17' || '' }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: contrib_regression
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
meson ninja-build \
libpq-dev unixodbc-dev libodbcinst2
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install meson ninja libpq unixodbc postgresql@17
brew services start postgresql@17
sleep 3
createdb contrib_regression || true
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: meson setup builddir
env:
PKG_CONFIG_PATH: ${{ matrix.os == 'macos-latest' && '/opt/homebrew/opt/libpq/lib/pkgconfig' || '' }}
- name: Build
run: meson compile -C builddir
- name: Test (unit tests)
run: meson test -C builddir --print-errorlogs
env:
PSQLODBC2_TEST_CONNSTR: ""
- name: Test (with PostgreSQL)
run: meson test -C builddir --print-errorlogs
env:
PSQLODBC2_TEST_CONNSTR: ${{ matrix.os == 'ubuntu-latest' && 'Server=localhost;Port=5432;Database=contrib_regression;UID=postgres;PWD=postgres' || 'Server=localhost;Port=5432;Database=contrib_regression' }}
# Upstream psqlodbc regression suite: compile the original test programs
# against our driver and diff against upstream's expected output. This is the
# coverage-parity signal. It is NON-BLOCKING for now (continue-on-error)
# because not all 60 tests pass yet; the step prints the pass/fail/skip
# summary so regressions are visible without failing the build.
- name: Checkout upstream psqlodbc (for regression tests)
if: matrix.os == 'ubuntu-latest'
uses: actions/checkout@v4
with:
repository: postgresql-interfaces/psqlodbc
path: upstream-psqlodbc
- name: Regression suite (upstream parity, non-blocking)
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: regress/run_regression.sh
env:
PSQLODBC_ORIG_DIR: ${{ github.workspace }}/upstream-psqlodbc
PG_HOST: localhost
PG_PORT: "5432"
PG_DATABASE: contrib_regression
PG_USER: postgres
PGPASSWORD: postgres
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install meson, ninja, and pkgconf
run: python -m pip install meson ninja pkgconf
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Remove Strawberry Perl from PATH
shell: powershell
run: |
# Strawberry Perl injects ccache and a broken pkg-config into PATH
$cleanPath = ($env:PATH -split ';' | Where-Object { $_ -notlike '*Strawberry*' }) -join ';'
echo "PATH=$cleanPath" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install PostgreSQL
shell: powershell
run: |
choco install postgresql17 --params "/Password:postgres /Port:5432" -y
# Add PostgreSQL bin to PATH for DLL loading at runtime
echo "C:\Program Files\PostgreSQL\17\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Fix libpq.pc prefix
shell: powershell
run: |
# The choco-installed PostgreSQL ships a libpq.pc with the build machine's
# prefix path baked in. Rewrite it to point to the actual install location.
$pgDir = "C:/Program Files/PostgreSQL/17"
$pcDir = "$pgDir/lib/pkgconfig"
if (Test-Path "$pcDir/libpq.pc") {
@"
prefix=$pgDir
includedir=`${prefix}/include
libdir=`${prefix}/lib
Name: libpq
Description: PostgreSQL libpq library
Version: 17
Libs: -L`${libdir} -lpq
Cflags: -I`${includedir}
"@ | Set-Content "$pcDir/libpq.pc"
}
- name: Configure
shell: powershell
run: |
# Create native file to use pkgconf-pypi (avoids broken pkg-config)
@"
[binaries]
pkg-config = 'pkgconf-pypi'
[built-in options]
pkg_config_path = 'C:/Program Files/PostgreSQL/17/lib/pkgconfig'
"@ | Set-Content native.ini
meson setup builddir -Ddriver_manager=none --native-file=native.ini
- name: Build
run: meson compile -C builddir
- name: Test (unit tests)
run: meson test -C builddir --print-errorlogs
env:
PSQLODBC2_TEST_CONNSTR: ""
- name: Test (with PostgreSQL)
run: meson test -C builddir --print-errorlogs
env:
PSQLODBC2_TEST_CONNSTR: "Server=localhost;Port=5432;Database=postgres;UID=postgres;PWD=postgres"