The best way approach to sent binary COPY data from application to server is to use the Binary Attach functions. See http://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/BinaryBulkLoad Martin. On 7/9/13 7:09 AM, Stefan Manegold wrote:
Dear Meng (or hlfwm hlfwm, or Angelasweet, or integrity),
if I / we do understand you correctly, you either want to link the MonetDB server as embedded library into you user / application program to call the C function that you implemented inside the MonetDB server from that program or you want your program to call that function inside the running MonetDB server via RPC or alike.
If that's the case, the simple answer is as follows: we have never done such thing (in fact, we do not even intend to do that), and thus simply do not know how to do that, and thus unfortunately cannot tell you how to do that. Sorry.
Best, Stefan
----- Original Message -----
Hi Lefteris,
Thank you for your guide on MAPI document, but i still didnt find my need.
what i want to do is if i define a function binarycopy() to copy bindary data into BATs in monetdb, how to call it in a C program? because monetdb doesn't supply such function in built-in functions, this function is like postgresql's function *PQputCopyData.* * * *This function is used to send data during COPY FROM STDIN. * * int PQputCopyData(PGconn *conn, const char *buffer, int nbytes); Transmits the COPY data in the specified buffer, of length nbytes, to the server. *
I just want to build such a similiar function in monetdb now.
Thank very much!
Meng
2013/7/6 Lefteris
I think your best chance to find an answer to your question is here
http://www.monetdb.org/Documentation/Manuals/SQLreference/Programming/MAPI
please read the available documentation for MonetDB. I hope this shows you the way to achieve your task.
Dear Lefteris,
Thank you for your patience and suggestions, I don't want this channel to teach me how to programming here,
I just want to resolve a small question that *****how or if i can****** call a user defined function as a C API?
Is it appropriate to a ask this question here?
Meng
2013/7/5 Lefteris
Dear Meng,
it seems to me that you are trying to do something that it might not part of your current skills. I suggest you read some manuals on how programs are interlinked, what are headers, how to include them, and so on.
The purpose of the MonetDB user-list is not to teach programming. In order for you to be successful in such complicated matters, as hacking the MonetDB code, you will have to experiment with it and gain some experience.
lefteris
On Fri, Jul 5, 2013 at 11:39 AM, hlfwm hlfwm
wrote: if not support, may i know how to call my defined function not in sql but as a C api?
2013/7/5 Stefan Manegold
> > We do not support that. Sorry. > > MonetDB is a client-server DBMS, not a linkable embedded > library. > > Stefan > > ----- Original Message ----- >> I dont have a choice, my work is to use monetdb functions >> as C API. >> >> Could you tell me how to use the embedded version,please? >> >> Thanks very much! >> Meng >> >> >> 2013/7/5 Martin Kersten >> >>> Hi >>> You want to use an embedded version of MonetDB? >>> That calls for quite some effort. >>> >>> regards, Martin >>> >>> On 7/5/13 4:49 AM, hlfwm hlfwm wrote: >>> >>>> Hi everyone, >>>> >>>> I want to know how to call my user defined function >>>> binarycopy() >>>> in MonetDB/sql/backends/monet5/**UDF/svom.c in another C On Sat, Jul 6, 2013 at 4:49 AM, Angelasweet
wrote: program? >>>> >>>> I dont want to use my UDF i sql client but want to use >>>> as a C API. >>>> >>>> >>>> Thanks! >>>> Meng >>>> >>>> >>>> >> >> _______________________________________________ >> users-list mailing list >> users-list@monetdb.org >> http://mail.monetdb.org/mailman/listinfo/users-list >> > > -- > | Stefan.Manegold@CWI.nl | DB Architectures (DA) | > | www.CWI.nl/~manegold/ | Science Park 123 (L321) | > | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | > > _______________________________________________ > users-list mailing list > users-list@monetdb.org > http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list