On 02/06/2017 10:48 AM, Daniil Megrabyan wrote:
>
>> 6 февр. 2017 г., в 18:19, Adrian Klaver <adrian.klaver@aklaver.com> написал(а):
>>
>>>>> I now doubt your program really calls PQprepare() in libpq.
>>>>
>>>> Hmm, this got me to wondering.
>>>>
>>>> If I recall OS X ships with its own version of Postgres.
>>>>
>>>> Can you search for what libpq versions you might have installed on your machine?
>>
>> Is there more then one version of libpq?
> There are some old versions.
>
> bash-3.2$ ls -la /usr/local/Cellar/postgresql/
> total 0
> drwxr-xr-x 5 danilabagroff admin 170 2 ноя 22:53 .
> drwxr-xr-x 35 danilabagroff admin 1190 17 ноя 17:55 ..
> drwxr-xr-x 11 danilabagroff admin 374 15 янв 2015 9.4.0
> drwxr-xr-x 11 danilabagroff admin 374 29 авг 16:06 9.4.5_2
> drwxr-xr-x 11 danilabagroff admin 374 2 ноя 22:53 9.5.4_1
These are Postgres versions. What I am talking about is the libpq
library that psqlodbc uses to communicate with Postgres.
Should have asked earlier, how did you install psqlodbc?
Find the psqlodbc file, on my machine(openSUSE 42.2 psqlodbc built from
source) it is:
/usr/local/lib64/psqlodbcw.so
From this post:
http://dba.stackexchange.com/questions/120309/psql-invalid-client-encoding-error-on-os-x-postgresql-9-4-5
on OS X you would need to do:
otool -L /path/to/psqlodbcw
This should show what libpq it is using.
>
> But in use just the latest one:
> miniBagroff:psqlodbc-09.06.0100 danilabagroff$ ls -la /usr/local/bin/pg_ctl
> lrwxr-xr-x 1 danilabagroff admin 39 2 ноя 22:53 /usr/local/bin/pg_ctl -> ../Cellar/postgresql/9.5.4_1/bin/pg_ctl
That indicates you are starting the latest Postgres version as your
Postgres server. It does not necessarily mean you are using the latest
libpq with psqlodbc.
>
>>>>
>>>> Also from your first post you have:
>>>>
>>>> PostgreSQL 9.5.4_1
>>>>
>>>> This is not Postgres community version number(the _1 part), so where did you get it and/or install it?
>>> This is homebrew(http://brew.sh) version, actual version is
>>>
>>> bash-3.2$ pg_ctl --version
>>> pg_ctl (PostgreSQL) 9.5.4
>>>
>>> — Daniil A Megrabyan —
>>>
>>>
>>>
>>
>
> — Daniil A Megrabyan —
> phone(telegram, whatsapp, viber) : +79151762470 | skype: danil.megrabyan
>
--
Adrian Klaver
adrian.klaver@aklaver.com