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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>, Daniil Megrabyan <danil(dot)megrabjan(at)gmail(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [HY000] no error information; Error while preparing parameters
Date: 2017-02-05 21:49:32
Message-ID: 00e180dc-bef6-ffad-7486-1b16bdb167b1@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 02/05/2017 12:58 PM, Inoue, Hiroshi wrote:
> On 2017/02/05 22:03, Inoue, Hiroshi wrote:
>>
>>
>> On 2017/02/05 17:30, Daniil Megrabyan wrote:
>>>> 5 февр. 2017 г., в 11:20, Inoue, Hiroshi <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
>>>> написал(а):
>>>>
>>>> This means
>>>> pgres = PQprepare(conn->pqconn, plan_name, query,
>>>> num_params, paramTypes);
>>>> returns a null pointer.
>>>> https://www.postgresql.org/docs/9.6/static/libpq-exec.html says
>>>> Returns a PGresult pointer or possibly a null pointer. A non-null
>>>> pointer will generally be returned except in out-of-memory conditions
>>>> or serious errors such as inability to send the command to the server.
>>> I believe, you can reproduce by your own.
>>
>> I tried on Windows and Linux but can't reproduce the case.
>> I have no mac Environment unfortunately.
>
> I recommend you to check the server log.
> 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?

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?

>
> regards,
> Hiroshi Inoue
>
>> regards,
>> Hiroshi Inoue
>>
>>>
>>> CREATE TABLE core_message (
>>> id int8 NOT NULL DEFAULT nextval('core_message_id_seq'::regclass),
>>> channel_id int8 NOT NULL,
>>> date timestamp(6) NOT NULL,
>>> member_id int8 NOT NULL,
>>> reply_id int8
>>> )
>>> WITH (OIDS=FALSE);
>>>
>>> CREATE TABLE core_textmessage (
>>> message_id int8 NOT NULL,
>>> text text NOT NULL
>>> )
>>> WITH (OIDS=FALSE);
>>>
>>> INSERT INTO core_textmessage(message_id, text) VALUES(1,
>>> ‘Мультибайт’) < This UTF8 text does the «magic» and environment
>>> becomes unusable
>>> INSERT INTO core_message(channel_id, date, member_id, reply_id)
>>> VALUES(25, '2017-02-05 11:01:34', 4, NULL)
>>>
>>> — 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 Daniil Megrabyan 2017-02-06 06:47:12 Re: [HY000] no error information; Error while preparing parameters
Previous Message Inoue, Hiroshi 2017-02-05 20:58:50 Re: [HY000] no error information; Error while preparing parameters