Thanks for the documentation link. It helped me to understand how data are
passed back to the client.
I figured out that data is sent back to the client using the 'printtup'
function. It is called by ExecSelect, called by ExecutorRun, etc. What I
understand now is that the data is sent to the client and stored there until
the client receives a message from the server to display it. The server
sends the display message from within 'ReadyForQuery' but I can't figure it
What I expect is that when I call 'exec_simple_query' several times, the
server sends one row only for each call. But since they are separate calls,
the client overwrites the previous results or saves the new row in a new
place in memory such that it displays the last row only when the server
I wonder if I am on the right track or not and how to know such kind of
message sent from the server?
----- Original Message -----
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "Islam Hegazy" <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2007 1:44 AM
Subject: Re: [HACKERS] modifying the table function
"Islam Hegazy" <[EMAIL PROTECTED]> writes:
My question is how to inform the client that there is a tuple to display
and return back to the backend to continue the query execution?
I'd suggest you start by reading
and then develop a clear specification at that level of what you
think should happen. Perhaps after that exercise it will be clearer
how to change the code. "Think first, program later."
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not