
On Wed, Dec 24, 2014 at 02:46:37PM +0900, Tim Burress wrote:
Hello,
I'm using MonetDB Oct2014-SP1 and have run into another problem with the inet datatype. When the data value is a network specification (address + prefix length in CIDR notation), it is possible to insert/update values using INSERT or UPDATE, but COPY INTO fails. For example, the following works fine:
create "testing" ^^^^ table missing ( network inet ); insert into "testing" values('192.168.0.1/24');
However if you create a file for bulk loading:
copy 1 records into "sys"."testing" from stdin using delimiters '\t','\n','"' ^^^^ ; missing 192.168.0.1
It seems to run on the branch already. Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased) Database: MonetDB v11.19.8 (unreleased), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql> create "testing" more> ( more> network inet more> ); syntax error, unexpected IDENT, expecting INDEX in: "create "testing"" sql> insert into "testing" values('192.168.0.1/24'); INSERT INTO: no such table 'testing' sql> sql> sql> create table "testing"( network inet); operation successful (15.042ms) sql> insert into "testing" values('192.168.0.1/24'); 1 affected row (3.841ms) sql>copy 1 records into "sys"."testing" from stdin using delimiters more>'\t','\n','"'; more>192.168.0.1 1 affected row (14.109ms) sql>select * from testing; +--------------------------------------------------------------------------------------------------------------------------------------+ | network | +======================================================================================================================================+ | 192.168.0.1/24 | | 192.168.0.1 | +--------------------------------------------------------------------------------------------------------------------------------------+ 2 tuples (1.365ms) Niels
and then try to load it, it fails:
mclient -d test
It seems like the parser for COPY INTO has a problem. Thus, among other things, it's impossible to use msqldump to save the content of a table and then restore it.
This also has big impact on my application at least, since individual inserts take much longer than COPY INTO.
Just thought I'd let you know!
Tim
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Manager ITF, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: https://www.cwi.nl/people/niels e-mail: Niels.Nes@cwi.nl