Missing library files??
Hi,
I've mailed this previously to the novice list, but got no response, so
hopefully this is more the appropriate place.
I'm trying to invoke the DirectFunctionCall1function as follows:
BOX* __tmp;
Datum d = DirectFunctionCall1(box_in,
BoxPGetDatum(ret_bbox));
__tmp = DatumGetBoxP(d);
(where ret_bbox is a string representation of a box)
from some client side code, but get linker errors stating that:
-> undefined reference to `DirectFunctionCall1(unsigned long
(*)(FunctionCallInfoData*), unsigned long)'
--> undefined reference to `box_in(FunctionCallInfoData*)
Is this because I'm calling the function incorrectly, or because I'm
missing the library in which these functions reside?
Many thanks,
Tony
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
I'm trying to invoke the DirectFunctionCall1function as follows:
...
from some client side code, but get linker errors stating that:
-> undefined reference to `DirectFunctionCall1(unsigned long
(*)(FunctionCallInfoData*), unsigned long)'
Is this because I'm calling the function incorrectly, or because I'm
missing the library in which these functions reside?
There *is* no "library in which those functions reside". They are
internal to the server and are not designed to be included in
client-side code.
regards, tom lane
Tom Lane wrote:
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
I'm trying to invoke the DirectFunctionCall1function as follows:
...
from some client side code, but get linker errors stating that:-> undefined reference to `DirectFunctionCall1(unsigned long
(*)(FunctionCallInfoData*), unsigned long)'Is this because I'm calling the function incorrectly, or because I'm
missing the library in which these functions reside?There *is* no "library in which those functions reside". They are
internal to the server and are not designed to be included in
client-side code.
Fair enough - that's what I half expected. I'm wanting to write some
embedded sql that selects a box attribute from a relation - is there any
direct way of retrieving a BOX typed value from the select without
having to go through decoding the retrieved string. I know I can do this
using a binary cursor, but this means moving from embedded sql.
Thanks,
Tony
Show quoted text
regards, tom lane
Gavin Sherry wrote:
On Wed, 19 Jun 2002, Tom Lane wrote:
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
I'm trying to invoke the DirectFunctionCall1function as follows:
...
from some client side code, but get linker errors stating that:-> undefined reference to `DirectFunctionCall1(unsigned long
(*)(FunctionCallInfoData*), unsigned long)'Is this because I'm calling the function incorrectly, or because I'm
missing the library in which these functions reside?There *is* no "library in which those functions reside". They are
internal to the server and are not designed to be included in
client-side code.You can access this function using the Fast Path Interface. See the libpq
documentation. However, I am unsure why you would want to get access to
this function on the client side.
I'm retrieving a box value via embedded sql, and wanted to use the
box_in method to decode the retrieved string - unless there's a direct
way of retrieving into a variable of the C type BOX??
Show quoted text
Gavin
Import Notes
Reference msg id not found: Pine.LNX.4.21.0206192342270.24742-100000@linuxworld.com.au | Resolved by subject fallback
On Wed, 19 Jun 2002, Tom Lane wrote:
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
I'm trying to invoke the DirectFunctionCall1function as follows:
...
from some client side code, but get linker errors stating that:-> undefined reference to `DirectFunctionCall1(unsigned long
(*)(FunctionCallInfoData*), unsigned long)'Is this because I'm calling the function incorrectly, or because I'm
missing the library in which these functions reside?There *is* no "library in which those functions reside". They are
internal to the server and are not designed to be included in
client-side code.
You can access this function using the Fast Path Interface. See the libpq
documentation. However, I am unsure why you would want to get access to
this function on the client side.
Gavin
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
Fair enough - that's what I half expected. I'm wanting to write some
embedded sql that selects a box attribute from a relation - is there any
direct way of retrieving a BOX typed value from the select without
having to go through decoding the retrieved string. I know I can do this
using a binary cursor, but this means moving from embedded sql.
The binary representation of BOX wouldn't necessarily be the same on
client and server machines anyway (surely you don't want to wire in
an assumption that client and server are on the same kind of hardware).
I'd say bite the bullet and parse the ASCII string; it's hardly
difficult.
regards, tom lane
Tom Lane wrote:
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
Fair enough - that's what I half expected. I'm wanting to write some
embedded sql that selects a box attribute from a relation - is there any
direct way of retrieving a BOX typed value from the select without
having to go through decoding the retrieved string. I know I can do this
using a binary cursor, but this means moving from embedded sql.The binary representation of BOX wouldn't necessarily be the same on
client and server machines anyway (surely you don't want to wire in
an assumption that client and server are on the same kind of hardware).I'd say bite the bullet and parse the ASCII string; it's hardly
difficult.
True, but if you guys decide to change the structure of a box string
down the line then not too good for backwards compatibility. sscanf here
I come....
Show quoted text
regards, tom lane