Update of /cvsroot/monetdb/sql/src/include
In directory sc8-pr-cvs16:/tmp/cvs-serv10215

Modified Files:
        sql_catalog.h 
Log Message:
The DROP function was modified.

DROP FUNCTION f_name;
It will drop the function f_name if there is only one function with such name.
If there are more function and error message is sent to ask you for the complete
signature.

DROP FUNCTION f_name();
It will drop the function f_name which does not have parameters.

DROP FUNCTION f_name(int, varchar(1024));
It will drop the function with this signature.
Note: The number bits for varchar it is only checked by the parser, 
semantically only the type is checked not the size.
The parser need to be fixed (maybe by Niels) to avoid this inconvenient.

DROP ALL FUNCTION f_name;
It will drop all the functions with the name f_name.

Note: In all the previous case the drop can be cascade.
Syntax:

DROP FUNCTION f_name [(type_list)] [CASCADE | RESTRICT];
DROP ALL FUNCTION f_name [CASCADE | RESTRICT]



Index: sql_catalog.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_catalog.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- sql_catalog.h       17 Apr 2007 10:22:59 -0000      1.46
+++ sql_catalog.h       28 Apr 2007 11:17:24 -0000      1.47
@@ -29,6 +29,11 @@
 #define ACT_SET_NULL 3
 #define ACT_SET_DEFAULT 4
 
+
+#define DROP_RESTRICT 0
+#define DROP_CASCADE 1
+#define DROP_CASCADE_START 2
+
 #define PRIV_SELECT 1
 #define PRIV_UPDATE 2
 #define PRIV_INSERT 4
@@ -510,6 +515,7 @@
 
 extern node *find_sql_func_node(sql_schema * s, char *tname, int id);
 extern sql_func *find_sql_func(sql_schema * s, char *tname);
+extern list *find_all_sql_func(sql_schema * s, char *tname);
 extern sql_func *sql_trans_bind_func(sql_trans *tr, char *name);
 
 #endif /* SQL_CATALOG_H */


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to