It is not possible in MonetDB SQL. Also not in the SQL standard. You will need to do such conditional DDL statements from an external program/script. Normally you would create all DB objects (schemas, tables, views, functions, procedures, etc) once (as monetdb admin) and next use/call them from your application. Is it not possible in your case to create all the needed functions once upfront? Why do you need to create them conditionally? Martin vD On 22-04-2020 15:58, Roberto Cornacchia wrote:
Hi,
I am afraid I know the answer to this already ("not supported"), but I wanted to check with you guys. Perhaps someone has smart workaround?
Essentially what I would like to do is something like:
IF condition THEN CREATE FUNCTION ....;
As far as I know, flow control statements are only allowed inside functions/procedures. However, CREATE statements are not allowed inside functions/procedure. So I don't see any way to do what I wrote above.
Notice, I am aware of CREATE OR REPLACE. What I'm looking for is an arbitrary condition test.
Any trick? And/or, any plan to implement something in this direction?
Roberto
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list