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

Re: Core dump when I run a program that uses embedded sql

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Ligia Pimentel <lmpimentel(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Core dump when I run a program that uses embedded sql
Date: 2001-08-31 19:14:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Wed, Aug 29, 2001 at 11:08:24AM -0500, Ligia Pimentel wrote:
> Then I precompile it (ecpg ...) successfully, and after that I compile it
> with gcc (also everything OK aparently), and when I try to run my program, I
> get
> SEGMENTATION FAULT (core dumped).

Where does it segfault? I need more info to help you. Could you please run
the program in gdb and tell me where exactly it segfaults?

If you need to learn more about the executed statementy you can add the
following code:

FILE *dbgs;

<at start of main()>
if ((dbgs = fopen("log", "w")) != NULL)
	ECPGdebug(1, dbgs);

<before exit>
if (dbgs != NULL)

This will log all actions by libecpg in file "log". However, this will give
you an empty file if the program segfaults before closing the file. 

Michael Meskes
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

pgsql-interfaces by date

Next:From: Jeremy BuchmannDate: 2001-08-31 23:34:19
Subject: Re: tcl on Mac OS X
Previous:From: Constantin TeodorescuDate: 2001-08-31 15:53:26
Subject: BUG in binaries for Mandrake 8.0 !!!

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