Please, ignore my question. The problem was that I did PQclear(res) before
calling to PQgetvalue(res,...)
Anyway, it should not crush (IMHO).
"Alex Glikson" <agliks(at)technion(dot)ac(dot)il> wrote in message
> My C program executes a pretty complex query (of length about 600 chars,
> with subqueries, etc.).
> When I run it (on Linux), it crashes with "Segmentation fault (core
> I'm sure that the program crashes on this specific PQexec command.
> Is there a length limit for queries in PQexec, or is there any other
> for it?
> The query is attached.
> Thanks in advance,
> P.S. The query is:
> SELECT s1.GivingCode FROM Scored s1, Scored s2
> WHERE s1.Score >= 8 AND s2.Score >= 8 AND s1.Year = s2.Year AND
> s1.GivingCode = s2.ReceivingCode AND s1.ReceivingCode = s2.GivingCode
> s1.GivingCode NOT IN (SELECT Code FROM Friends) AND
> s1.ReceivingCode IN (SELECT Code FROM Friends) AND
> NOT EXISTS (SELECT * FROM Represented re1, Represented re2, Scored sc
> re1.Year = re2.Year AND re1.Year = sc.Year AND re1.Code =
> re2.Code = s1.ReceivingCode AND
> ((sc.GivingCode = s1.ReceivingCode AND sc.ReceivingCode =
> AND sc.Score < 8) OR
> (sc.GivingCode = s1.GivingCode AND sc.ReceivingCode =
> AND sc.Score < 8)))
In response to
pgsql-bugs by date
|Next:||From: Achilleus Mantzios||Date: 2002-01-10 16:27:24|
|Previous:||From: Alex Glikson||Date: 2002-01-10 08:31:43|
|Subject: LIBPQ: program crashed during executing query|