how to debug and use user defined functions?

Angelasweet hlfwmqd at gmail.com
Tue Jul 9 05:25:41 CEST 2013


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 <lsidir at gmail.com>

> 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.
>
> On Sat, Jul 6, 2013 at 4:49 AM, Angelasweet <hlfwmqd at gmail.com> wrote:
> > 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 <lsidir at gmail.com>
> >>
> >> 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 <hlfwmqd at gmail.com> 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 <Stefan.Manegold at cwi.nl>
> >> >>
> >> >> 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 <Martin.Kersten at cwi.nl>
> >> >> >
> >> >> > > 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
> 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 at monetdb.org
> >> >> > http://mail.monetdb.org/mailman/listinfo/users-list
> >> >> >
> >> >>
> >> >> --
> >> >> | Stefan.Manegold at 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 at monetdb.org
> >> >> http://mail.monetdb.org/mailman/listinfo/users-list
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > users-list mailing list
> >> > users-list at monetdb.org
> >> > http://mail.monetdb.org/mailman/listinfo/users-list
> >> >
> >> _______________________________________________
> >> users-list mailing list
> >> users-list at monetdb.org
> >> http://mail.monetdb.org/mailman/listinfo/users-list
> >
> >
> >
> > _______________________________________________
> > users-list mailing list
> > users-list at monetdb.org
> > http://mail.monetdb.org/mailman/listinfo/users-list
> >
> _______________________________________________
> users-list mailing list
> users-list at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/users-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/users-list/attachments/20130709/bab92781/attachment.html>


More information about the users-list mailing list