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

modifying in the libpg files

From: "Islam Hegazy" <islheg(at)gmail(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: modifying in the libpg files
Date: 2007-04-22 02:10:45
Message-ID: 002d01c78483$756209d0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Hi there
I am a grad student in CS University of Calgary. I work on  project to modify the behavior of the table functions to return on iterative base instead of materialization. So far I have succeeded in doing this it seems now that I am one step away from the end. I face a problem now with the front-end, how to display the rows as they are received. That is I want to call 'PrintQueryTuples' from within 'PQexecFinish' instead of 'SendQuery'. 'PQexecFinish' is defined in '../src/interfaces/libpq/fe-exec.c' and 'PrintQueryTuples' is defined in '../src/bin/psql/common.c'

I made the following steps: 
1) redefined 'PrintQueryResults' in common.c to be extern (not static as the initial definition) to be able to use it elsewhere 2) added a declaration for ''PrintQueryResults' in common.h, to tell other files about it 
3) removed 'PrintQueryResults' invocation from 'SendQuery' in common.c
4) added #include "../bin/psql/common.h" to fe-exec.c
5) called 'PrintQueryResults' from within 'PQexecFinish', last statement in the while loop 
when I gmake the project I receive the following error:
../../src/interfaces/libpq/ undefined reference to `PrintQueryResults'
collect2: ld returned 1 exit status
gmake[5]: *** [test1] Error 1
gmake[5]: Leaving directory `/home/grads/imehegaz/postgresql-8.2.3-b/src/interfaces/ecpg/test/connect'
gmake[4]: *** [all] Error 2
gmake[4]: Leaving directory `/home/grads/imehegaz/postgresql-8.2.3-b/src/interfaces/ecpg/test'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/home/grads/imehegaz/postgresql-8.2.3-b/src/interfaces/ecpg'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/grads/imehegaz/postgresql-8.2.3-b/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/grads/imehegaz/postgresql-8.2.3-b/src'
gmake: *** [all] Error 2

I install Postgresql using the gmake command  under Linux.I wonder what does this error mean and how to solve it? Notice: in the backend, I also invoked functions in different files and directories and I didn't face this problem.

Islam Hegazy


pgsql-interfaces by date

Next:From: Tom LaneDate: 2007-04-22 02:55:34
Subject: Re: modifying in the libpg files
Previous:From: Islam HegazyDate: 2007-04-22 01:40:29
Subject: modifying in the libpg files

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