
Hai Meng, As I have already mentioned in my earlier e-mails, you need to extend your C-code to write your binary data to files, one file per column. E.g., change writeToDBBinary() to do the following steps: 0. create a strBuf for every column, and add data per column. (your existing code add data per row). 1. fopen() open a file for writing one column. 2. fwrite() to write each strBuf to the corresponding file 3. fclose() all open files 4. execute "COPY BINARY INTO" query You can find the exact usages of these function from their MAN pages, or any C-programming text books, or Baidu. Regards, Jennie On Jul 17, 2013, at 10:02, Angelasweet wrote:
then when i want to COPY BINARY INTO table, how to write to float into a file in the binary form first?
2013/7/17 Stefan Manegold <Stefan.Manegold@cwi.nl> No, MonetDB currently does not support binary copy into file. You might want to file a feature request for this via http://bugs.monetdb.org/
Stefan
----- Original Message -----
Thanks very much, it works!
Still i want to know can i use COPY INTO FILE like "copy select * from sys.testtable into '/home/data1/file2'; " to copy into file in a binary form? because i want to use COPY BINARY INTO tablename, but i dont know how to write the result set of float and double binary into a file first.
Meng
2013/7/17 Stefan Manegold <Stefan.Manegold@cwi.nl>
Indeed. Thanks! Fixed.
----- Original Message -----
On 17.07.2013, at 08:04, Stefan Manegold <Stefan.Manegold@cwi.nl> wrote:
They should reside on the same file system as the database farm" This one is actually a "must".
Best
Hannes
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@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@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@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@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list