[Monetdb-developers] MAL access to tables created with SQL

darabi at web.de darabi at web.de
Sat Oct 13 16:54:04 CEST 2007

Niels.Nes at cwi.nl wrote:

> Well embedded_mal could still load the sql module and then extra
> threads maybe created. Its more a warning, sql should be the one
> making changes to the catalog.  If you think of you application/extention
> as do some sql to create tables, then exit sql, do querying with your
> own frontend, it should work out just fine.

Just to make sure, I understand correctly what you mean: 

- I can open an sql session with mclient and modify the tables with sql

- then I open a mal session and query the bats/create the additional bats?

My question is: can I open a mal session and somehow query/modify the sql catalog
with the functions in the sql module?

For example, is it legal to do this:

$ mclient -l mal -d demo -H
mal>include sql; 
mal>bat1 := sql.bind("sys","_tables","id",1);

The last statement hangs the client.

If this is not allowed/possible in mclient, would I be able to do
that with an embedded server, which is started with embedded_mal?

> Anyway this means you'll have to get in depth knowledge on m5 and sql.
> Which afcourse you can only obtain by reading all the manuals etc and
> playing with the code, we won't have the time to give you this by email.

Yes, this is what I'm trying to do and I didn't expect you to
give me this be email. 

You (well, and the colleagues your organisation :) did enough to 

a) create this amazing piece of software

b) make it open source, so everyone can learn from it

c) write some extensive documentation (which is not usual for OSS)

and I appreciate your doing so!

Unfortunately, the first days are the hardest. So, bear with me
if I ask stupid questions.

I hope I could clarify what I would like to do:

1) use module sql (function in MonetDB-SQL/sql/src/backends/monet5/sql.mal)
to do most of the work

2) use some additional bats to store information related to the objects

If this is a bad idea, I would appreciate any hint.

Thanks a lot


More information about the developers-list mailing list