pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Islam Hegazy <islheg@gmail.com>
To: pgsql-interfaces@postgresql.org
Subject: modifying in the libpg files
Date: Sat, 21 Apr 2007 19:40:29 -0600
Message-ID: <001401c7847f$3b42b910$0d0e9f88@pc.cpsc.ucalgary.ca> (raw)


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/libpq.so: 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 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.

Regards
Islam Hegazy

view thread (4+ messages)  latest in thread

Message-ID: <001401c7847f$3b42b910$0d0e9f88@pc.cpsc.ucalgary.ca>
Permalink:  ../001401c7847f$3b42b910$0d0e9f88@pc.cpsc.ucalgary.ca/
Also on:    postgresql.org/message-id/001401c7847f$3b42b910$0d0e9f88@pc.cpsc.ucalgary.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: islheg@gmail.com
  Subject: Re: modifying in the libpg files
  In-Reply-To: <001401c7847f$3b42b910$0d0e9f88@pc.cpsc.ucalgary.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox