Skip site navigation (1) Skip section navigation (2)

Re: libpq on windows

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Gustavo Lopes" <contratempo(at)gmail(dot)com>,<pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libpq on windows
Date: 2005-05-22 13:18:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I've done a couple of tests and in all my tests I see no problems with
multiline error messages.

Also, if I read your original post right, yuou're seeing the problem in
a program that does a simple "PQconnectdb()" to a server that's not
running, in which case the normal errormsg-from-backend routines are
definitly not involved. it looks more like "random errors" to me.

Do you see this problem if you use the psql.exe command to connect to
the very same machine? Since psql.exe uses libpq, if it works there,
then it's not "deep inside libpq" at least.

It looks like you are using Borland C++ to compile your program, right?
Could you try the same program compiled with the MingW compiler? It
could be that your import library is somehow incorrect (say bad function
calling conventions, bad function ordering or something), which would
lead to strange errors.

Your simple test program from
works just fine in my installation - it doesn't do anything, but it
doesn't crash either. Compiled with MingW that is, I don't have Borland
to test with. And with manual linking and not the #pragma link, because
that appears to be a Borlandism.


>Is there any easy (ie, no C postgres functions)  way to generate
>multi-line error messages so that I can explore that possibility?
>Gustavo Lopes
>On 20/05/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Gustavo Lopes <contratempo(at)gmail(dot)com> writes:
>> > Actually it seems the hints are not the problem. I see no 
>pattern now.
>> > For instance, if table "j" doesn't exist, "drop table j" 
>is ok but not
>> > "drop table".
>> Well, the latter generates a syntax complaint:
>> regression=# drop table j;
>> ERROR:  table "j" does not exist
>> regression=# drop table ;
>> ERROR:  syntax error at or near ";" at character 12
>> LINE 1: drop table ;
>>                    ^
>> regression=#
>> Maybe the pattern is "any multi-line error message causes a problem"?
>>                         regards, tom lane
>---------------------------(end of 
>TIP 9: the planner will ignore your desire to choose an index 
>scan if your
>      joining column's datatypes do not match


pgsql-interfaces by date

Next:From: John DeSoiDate: 2005-05-22 13:27:05
Subject: Re: MacOS Interface ?
Previous:From: Volkan YAZICIDate: 2005-05-22 07:22:24
Subject: Re: libpq on windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group