Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ljLj3-0002Ro-EH for pgsql-odbc@arkaria.postgresql.org; Wed, 19 May 2021 12:55:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ljLj2-0003Wm-C8 for pgsql-odbc@arkaria.postgresql.org; Wed, 19 May 2021 12:55:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ljLj1-0003Wd-SR for pgsql-odbc@lists.postgresql.org; Wed, 19 May 2021 12:55:00 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ljLiz-0007Lt-7V for pgsql-odbc@lists.postgresql.org; Wed, 19 May 2021 12:54:58 +0000 Received: by mail-ej1-x630.google.com with SMTP id p24so18564263ejb.1 for ; Wed, 19 May 2021 05:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I9O8W2r1Zx6aGvNMW0ZLeoknk9uGdHFBKOWnvDALZg8=; b=dpmP1iY+c97FdKdbqq3KD5hIHy5uvP78ifpzZzkr3+865Z5jFgGMHJqvblNVbeb0Iz YaSTw/hvEy/EtFUu75NZxb1yIh5lEXf64dutyv6nPwyifoHWiU7iv79iHrr4Q46fN0qA Lfmyv423ud4GM53VMKhE12CUzzuDWC8xatgom0XuEyqv9mu6I5moejvDZplk++e7GG85 6UZh+YMuahDipvCnGmwwATdzDPOljcNsvnJTFK5MQhqGnRPPHsZauxIBiornPXl6eDDb ml65s3VETA8bQ48BrpYigVWPm6xXOvoCk7ng/NBZ7joLqO8FN+YX9zETD0G0BJJVzfcd mt+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I9O8W2r1Zx6aGvNMW0ZLeoknk9uGdHFBKOWnvDALZg8=; b=oKNZAAwiJnZxSiz3IoEi22LU3sQrUDcJ4X4gKADg+iE9WKQJuncvvinZ4Xet+9EyXB C8iKJAgNGEySSRYmVv6t8aDdaPJERb7FtG5gMDBohAE2j8xIJ0WDJBG+1QRtcspu99NT 04d977OQa+P0c4A/pXI5aIWZXKIC2Ntwpahq6cAf146GO+s0NuyMCPqDprElp8/gyJAU ROc1TUuJ5hgOV9qE7sNJWD16A1Rm8vTjEv9J/02DbwQ0rIFGoE2dyEFU1Lfg8gLN3n0d QY0/rjRNDCs4736/H4NYgRtwPNCv6+ncRYFrcCCUiKLFOmAcfJDJc5p2+TEckBcO5rtf 6WTQ== X-Gm-Message-State: AOAM532skp5nPnLuOGVpC/vfEc/x9MDfDrt1M5afzQ/xDw6ZtyVyX/Ds s2KTDnjewl4W4z9xyylL5lVmn9hE+YmDWGkGP2zrX8vOfgM= X-Google-Smtp-Source: ABdhPJw5UJ4HmqqY2dnZrk6g5aqqdHqjqTcVwsFOBHDXNsMdDOa1TkxyNY2U73PSaqC/jt1CuphVhN5ttfKY/wg6h/s= X-Received: by 2002:a17:907:d25:: with SMTP id gn37mr12274470ejc.538.1621428895912; Wed, 19 May 2021 05:54:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Inoue,Hiroshi" Date: Wed, 19 May 2021 21:54:44 +0900 Message-ID: Subject: Re: [PATCH] Automatic fetching of refcursors To: Adrian Grucza Cc: pgsql-odbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000005e97a105c2ae55bf" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005e97a105c2ae55bf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Adrian, As for the patch 0001, is DriverConfiguration necessary? For example, how about the following patch? diff --git a/winbuild/regress.ps1 b/winbuild/regress.ps1 index b5e1f85..f83a411 100644 --- a/winbuild/regress.ps1 +++ b/winbuild/regress.ps1 @@ -27,7 +27,7 @@ automatically unless this option is specified. Currently "4.0", "12.0" or "14.0" is available. .PARAMETER Configuration - Specify "Release"(default) or "Debug". + Specify the configuration used for the regression tests. "Release"(default) or "Debug". .PARAMETER BuildConfigPath Specify the configuration xml file name if you want to use the configuration file other than standard one. @@ -263,7 +263,7 @@ function SpecialDsn($testdsn, $testdriver) $uid =3D $in } $in =3D read-host -assecurestring "Password [$passwd]" - if ("$in" -ne "") { + if ($in.Length -ne 0) { $ptr =3D [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($in) $passwd =3D [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ptr) } @@ -394,12 +394,12 @@ foreach ($pl in $pary) { "Win32" { $targetdir=3D"test_x86" $bit=3D"32-bit" - $dlldir=3D"$objbase\x86_${ansi_dir_part}_Release" + $dlldir=3D"$objbase\x86_${ansi_dir_part}_$Configuration" } default { $targetdir=3D"test_x64" $bit=3D"64-bit" - $dlldir=3D"$objbase\x64_${ansi_dir_part}_Release" + $dlldir=3D"$objbase\x64_${ansi_dir_part}_$Configuration" } } pushd $pushdir\$targetdir regards, Hiroshi Inoue 2021=E5=B9=B45=E6=9C=8817=E6=97=A5(=E6=9C=88) 15:35 Inoue,Hiroshi : > Hi Adrian, > > I would take care of your patches. > > Thanks. > Hiroshi Inoue > > 2021=E5=B9=B45=E6=9C=8817=E6=97=A5(=E6=9C=88) 11:21 Adrian Grucza : > >> Hi all, >> >> I've created a patch that enables automatic fetching of refcursors from = a >> function/procedure. Functions/procedures can return one or more refcurso= rs, >> and the client application can then consume them the way multiple result >> sets are normally consumed via ODBC. >> >> Below is a summary of the attached patches: >> >> 0001 (`regress.ps1` changes unrelated to refcursors) >> * Allow installation and testing of a debug build of the driver (usefu= l >> for debugging) >> * Fixed a bug in `regress.ps1` where accepting the default password of >> `postgres` did not work >> >> 0002 >> * Added a FetchRefcursors setting >> * When FetchRefcursors is enabled, executes some refcursor code in >> `statement.c` that already existed but was not compiled in due to >> REFCUR_SUPPORT not being #defined >> >> 0003 >> * Enhanced refcursor code to support multiple refcursors >> * Fixed an issue where output parameter bindings were not processed >> when using refcursors >> * Added a `fetch-refcursors` regression test >> >> Notes: >> * Client application must execute the statement in a transaction to >> avoid cursors being closed prematurely (i.e. turn auto-commit off) >> * Works with both ODBC CALL and PostgreSQL CALL syntaxes >> * A search through the mailing list archive shows that refcursor >> support is a feature that multiple people have wanted >> >> Regards, >> [image: iress.com] >> Adrian Grucza=E2=80=8B >> Technical Lead >> Tel: +61390185800 >> *adrian.grucza@iress.com* >> *www.iress.com* >> Level 16, 385 Bourke Street, Melbourne, Victoria, 3000 >> The contents of this email originated from Iress. For this purpose Iress >> includes Iress Limited and/or any of its subsidiaries, holding companies >> and trading entities. =E2=80=8BIf you have received this email in error = please >> notify the sender immediately and delete this email. >> nosig >> > --0000000000005e97a105c2ae55bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Adrian,

As for the patch 0001, is Dr= iverConfiguration necessary?
For example, how about the following= patch?

diff --git a/winbuild/regress.ps1 b/winbui= ld/regress.ps1
index b5e1f85..f83a411 100644
--- a/winbuild/regress.p= s1
+++ b/winbuild/regress.ps1
@@ -27,7 +27,7 @@
=C2=A0 =C2=A0 =C2= =A0automatically unless this option is specified.=C2=A0 Currently "4.0= ",
=C2=A0 =C2=A0 =C2=A0"12.0" or "14.0" is avai= lable.
=C2=A0.PARAMETER Configuration
- =C2=A0 =C2=A0Specify "Re= lease"(default) or "Debug".
+ =C2=A0 =C2=A0Specify the co= nfiguration used for the regression tests. "Release"(default) or = "Debug".
=C2=A0.PARAMETER BuildConfigPath
=C2=A0 =C2=A0 =C2= =A0Specify the configuration xml file name if you want to use
=C2=A0 =C2= =A0 =C2=A0the configuration file other than standard one.
@@ -263,7 +263= ,7 @@ function SpecialDsn($testdsn, $testdriver)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $uid =3D $in=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $in =3D read-host -assecurest= ring "Password [$passwd]"
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 if ("$in" -ne "") {
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ($in.Length -ne 0) {
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $ptr= =3D [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($in)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 $passwd =3D [System.Runtime.InteropServices.Marshal]::PtrToStrin= gBSTR($ptr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }@@ -394,12 +394,12 @@ foreach ($pl in $pary) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0"Win32" {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $targetdir=3D"test_x86"=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 $bit=3D"32-bit"
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $dlldir=3D"$objbase\x= 86_${ansi_dir_part}_Release"
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $dlldir=3D"$objbase\x86_${an= si_dir_part}_$Configuration"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0default {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 $targetdir=3D"test_x64"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $bit=3D"64-bit&qu= ot;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 $dlldir=3D"$objbase\x64_${ansi_dir_part}_Release"
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 $dlldir=3D"$objbase\x64_${ansi_dir_part}_$Configuration"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pushd $pushdir\$targetdir

regards,
Hiroshi Inoue

=
2021=E5=B9= =B45=E6=9C=8817=E6=97=A5(=E6=9C=88) 15:35 Inoue,Hiroshi <hinoue205@gmail.com>:
Hi Adrian,

I would take care of your patches.

Thanks= .
Hiroshi Inoue

2021=E5=B9=B45=E6=9C=8817=E6=97=A5(=E6=9C=88= ) 11:21 Adrian Grucza <adrian.grucza@iress.com>:
Hi all,

I've = created a patch that enables automatic fetching of refcursors from a functi= on/procedure. Functions/procedures can return one or more refcursors, and t= he client application can then consume them the way multiple result sets ar= e normally consumed via ODBC.

Below is a summary of the attached pat= ches:

0001 (`regress.ps1` changes unrelated to refcursors)
=C2=A0= * Allow installation and testing of a debug build of the driver (useful fo= r debugging)
=C2=A0 * Fixed a bug in `regress.ps1` where accepting the = default password of `postgres` did not work

0002
=C2=A0 * Added a= FetchRefcursors setting
=C2=A0 * When FetchRefcursors is enabled, execu= tes some refcursor code in `statement.c` that already existed but was not c= ompiled in due to REFCUR_SUPPORT not being #defined

0003
=C2=A0 *= Enhanced refcursor code to support multiple refcursors
=C2=A0 * Fixed a= n issue where output parameter bindings were not processed when using refcu= rsors
=C2=A0 * Added a `fetch-refcursors` regression test

Notes:<= br>=C2=A0 * Client application must execute the statement in a transaction = to avoid cursors being closed prematurely (i.e. turn auto-commit off)
= =C2=A0 * Works with both ODBC CALL and PostgreSQL CALL syntaxes
=C2=A0 *= A search through the mailing list archive shows that refcursor support is = a feature that multiple people have wanted

Regards,
=
Adrian=C2=A0Grucza=E2=80=8B=C2=A0=C2=A0
Technical=C2=A0L= ead
Tel:=C2=A0+61390185800
adrian.grucza@iress.com
www.iress.com
<= /table>
Level=C2=A016,=C2=A0385=C2=A0Bourke=C2=A0Street,
=C2=A0Melbourne,=C2=A0Victoria,=C2=A03000
The contents of= this email originated from Iress. For this purpose Iress includes Iress Li= mited and/or any of its subsidiaries, holding companies and trading entitie= s. =E2=80=8BIf you have received this email in error please notify the send= er immediately and delete this email.=C2=A0
nosig
--0000000000005e97a105c2ae55bf--