Thread: psqlodbc without libpq

psqlodbc without libpq

From
brajmohan saxena
Date:
Hi

Please let me know why do we need libpq while building/compiling psqlodbc drivers on latest driver versions.

Is there any way I can build the psqlodbc drivers without libpq dependency on it.
Thanks in advance.

Regards
Braj

Re: psqlodbc without libpq

From
Adrian Klaver
Date:
On 09/23/2016 12:02 AM, brajmohan saxena wrote:
> Hi
>
> Please let me know why do we need libpq while building/compiling
> psqlodbc drivers on latest driver versions.

https://odbc.postgresql.org/docs/release.html

"psqlODBC 09.05.0100 Release
Changes:
Use libpq for all communication with the server
Previously, libpq was only used for authentication. Using it for all
communication lets us remove a lot of duplicated code. libpq is now
required for building or using libpq." <-- Pretty sure that is supposed
to be psqlodbc.

>
> Is there any way I can build the psqlodbc drivers without libpq
> dependency on it.

The only way I know is to use a release before 09.05.0100.

> Thanks in advance.
>
> Regards
> Braj


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: psqlodbc without libpq

From
Heikki Linnakangas
Date:
On 09/26/2016 10:11 PM, Adrian Klaver wrote:
> On 09/23/2016 12:02 AM, brajmohan saxena wrote:
>> Is there any way I can build the psqlodbc drivers without libpq
>> dependency on it.
>
> The only way I know is to use a release before 09.05.0100.

Note that you can link libpq statically, so that you only need to have
libpq around when building, but not when using the driver.

- Heikki



Re: psqlodbc without libpq

From
Michael Paquier
Date:
On Tue, Sep 27, 2016 at 4:58 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> On 09/26/2016 10:11 PM, Adrian Klaver wrote:
>>
>> On 09/23/2016 12:02 AM, brajmohan saxena wrote:
>>>
>>> Is there any way I can build the psqlodbc drivers without libpq
>>> dependency on it.
>>
>>
>> The only way I know is to use a release before 09.05.0100.
>
>
> Note that you can link libpq statically, so that you only need to have libpq
> around when building, but not when using the driver.

If you for example compile with win64.mak and nmake, you can enforce
that using /MD or /MT in windows-local.mak, variable CUSTOMCLOPT:
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
--
Michael


Re: psqlodbc without libpq

From
Adrian Klaver
Date:
On 09/28/2016 04:49 AM, brajmohan saxena wrote:
> Hi,
>
> Thanks Adrain,Heikki,Micheal for such a valuable respond, Its really
> helpful.
>
> Now I have one more query regarding psqlODBC drivers.
> I can find the plsqODBC drivers source and binaries are available at (
> https://www.postgresql.org/ftp/odbc/versions/ )
> So the community also maintain psqlodbc installable for Linux
> (centos/Ubuntu) with the same release as for Windows.

Are you talking about packages for the binaries for the various Linux
distros?

If so:

For RH family:

https://yum.postgresql.org/news-packagelist.php

For deb:

http://apt.postgresql.org/pub/repos/apt/pool/main/p/psqlodbc/

>
> Thanks in advance,
>
> Regards
> Braj
>
> On Tue, Sep 27, 2016 at 5:22 AM, Michael Paquier
> <michael.paquier@gmail.com <mailto:michael.paquier@gmail.com>> wrote:
>
>     On Tue, Sep 27, 2016 at 4:58 AM, Heikki Linnakangas <hlinnaka@iki.fi
>     <mailto:hlinnaka@iki.fi>> wrote:
>     > On 09/26/2016 10:11 PM, Adrian Klaver wrote:
>     >>
>     >> On 09/23/2016 12:02 AM, brajmohan saxena wrote:
>     >>>
>     >>> Is there any way I can build the psqlodbc drivers without libpq
>     >>> dependency on it.
>     >>
>     >>
>     >> The only way I know is to use a release before 09.05.0100.
>     >
>     >
>     > Note that you can link libpq statically, so that you only need to have libpq
>     > around when building, but not when using the driver.
>
>     If you for example compile with win64.mak and nmake, you can enforce
>     that using /MD or /MT in windows-local.mak, variable CUSTOMCLOPT:
>     https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
>     <https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx>
>     --
>     Michael
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: psqlodbc without libpq

From
brajmohan saxena
Date:
Hi,

Thanks Adrain,Heikki,Micheal for such a valuable respond, Its really helpful.

Now I have one more query regarding psqlODBC drivers.
I can find the plsqODBC drivers source and binaries are available at ( https://www.postgresql.org/ftp/odbc/versions/ )
So the community also maintain psqlodbc installable for Linux (centos/Ubuntu) with the same release as for Windows.

Thanks in advance,

Regards
Braj  

On Tue, Sep 27, 2016 at 5:22 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Tue, Sep 27, 2016 at 4:58 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> On 09/26/2016 10:11 PM, Adrian Klaver wrote:
>>
>> On 09/23/2016 12:02 AM, brajmohan saxena wrote:
>>>
>>> Is there any way I can build the psqlodbc drivers without libpq
>>> dependency on it.
>>
>>
>> The only way I know is to use a release before 09.05.0100.
>
>
> Note that you can link libpq statically, so that you only need to have libpq
> around when building, but not when using the driver.

If you for example compile with win64.mak and nmake, you can enforce
that using /MD or /MT in windows-local.mak, variable CUSTOMCLOPT:
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
--
Michael