Re: [HY000] no error information; Error while preparing parameters

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Daniil Megrabyan <danil(dot)megrabjan(at)gmail(dot)com>
Cc: pgsql-odbc <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [HY000] no error information; Error while preparing parameters
Date: 2017-02-06 20:57:28
Message-ID: 9d708bb7-99fd-b182-2869-6c694b1fbcbf@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 02/06/2017 10:48 AM, Daniil Megrabyan wrote:
>
>> 6 февр. 2017 г., в 18:19, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Vilches, Alejandro 2017-02-07 00:24:46 Re: Problem calling a function from ODBC application
Previous Message Adrian Klaver 2017-02-06 15:19:31 Re: [HY000] no error information; Error while preparing parameters