Niels Nes wrote:
Update of /cvsroot/monetdb/sql/src/server In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13513/src/server
Modified Files: rel_semantic.mx sql_parser.mx sql_psm.mx sql_semantic.mx sql_updates.mx Log Message: added binary import support (using new BATattach)
Index: sql_parser.mx =================================================================== RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v retrieving revision 1.299 retrieving revision 1.300 diff -u -d -r1.299 -r1.300 --- sql_parser.mx 17 Jan 2009 18:17:01 -0000 1.299 +++ sql_parser.mx 22 Jan 2009 21:58:06 -0000 1.300
@@ -2400,6 +2401,12 @@ append_list(l, $2); append_string(l, $8); $$ = _symbol_create_list( SQL_COPYFROM, l ); } +/* binary copy from */ + | COPY INTO qname FROM '(' string_commalist ')' + { dlist *l = L(); + append_list(l, $3); + append_list(l, $6); + $$ = _symbol_create_list( SQL_BINCOPYFROM, l ); } | COPY select_no_parens_orderby INTO string opt_seps opt_null_string { dlist *l = L(); append_symbol(l, $2);
This appears to break the syntax copy into a from '/tmp/i' using delimiters '\t'; (!syntax error, unexpected STRING, expecting '(' in: "explain copy into a from '/tmp/i'"). It can be salvaged by adding opt_nr like the two COPY statements before this, but then you'd have to check "by hand" that opt_nr returns NULL. -- Sjoerd Mullender