Re: Using host variables -- segmentation fault
От | Michael Fuhr |
---|---|
Тема | Re: Using host variables -- segmentation fault |
Дата | |
Msg-id | 20061016134124.GA59444@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Using host variables -- segmentation fault (Yadnyesh Joshi <yadnyesh_joshi@yahoo.com>) |
Список | pgsql-novice |
On Mon, Oct 16, 2006 at 05:16:06AM -0700, Yadnyesh Joshi wrote: > The first EXEC SQL INSERT INTO simple values (6); executes fine. The > value is added in the database as I am doing a COMMIT. > > However, segmentation fault occurs at EXEC SQL INSERT INTO simple values (:i); > What can be the problem? The program you posted doesn't initialize i but I'd expect that to result in a garbage value being inserted instead of a segmentation fault. Do you still get a segmentation fault if you initialize i? What about if you comment out the line that inserts i? Your program doesn't return a value from main(). I haven't worked on any platforms where that would cause a segmentation fault but it should be fixed in any case. What platform are you on? What version of PostgreSQL? Did you get a core dump? If so, what does a stack trace show? What do you see if you add "ECPGdebug(1, stderr);" at the beginning of the program? -- Michael Fuhr
В списке pgsql-novice по дате отправления: