[MonetDB-users] SQL BLOB minor issue
Hi, This is probably bad SQL-fu on my part, but you never know :-). I'm trying to insert a 0-byte blob into a table, but that doesn't work for me. The SQL code below fails on the second insert, the database complains about a bad blob syntax. Inserting an implicit NULL into a BLOB colum also fails (the 3th insert), even though inserting an explicit NULL (the fourth one) does succeed. CREATE TABLE testtable ( id INTEGER data BLOB ); INSERT INTO testtable (id, data) VALUES (0, BLOB '00'); INSERT INTO testtable (id, data) VALUES (1, BLOB ''); INSERT INTO testtable (id) VALUES (2); INSERT INTO testtable (id, data) VALUES (2, NULL); Regards, Ronald
On 2006-11-23 14:51, Ronald Oussoren wrote:
Hi,
This is probably bad SQL-fu on my part, but you never know :-). I'm trying to insert a 0-byte blob into a table, but that doesn't work for me. The SQL code below fails on the second insert, the database complains about a bad blob syntax. Inserting an implicit NULL into a BLOB colum also fails (the 3th insert), even though inserting an explicit NULL (the fourth one) does succeed.
CREATE TABLE testtable ( id INTEGER data BLOB );
INSERT INTO testtable (id, data) VALUES (0, BLOB '00');
INSERT INTO testtable (id, data) VALUES (1, BLOB '');
INSERT INTO testtable (id) VALUES (2);
INSERT INTO testtable (id, data) VALUES (2, NULL);
Can you make a bugreport out of this? Thanks. -- Sjoerd Mullender
On Dec 12, 2006, at 12:57 PM, Sjoerd Mullender wrote:
On 2006-11-23 14:51, Ronald Oussoren wrote:
Hi,
This is probably bad SQL-fu on my part, but you never know :-). I'm trying to insert a 0-byte blob into a table, but that doesn't work for me. The SQL code below fails on the second insert, the database complains about a bad blob syntax. Inserting an implicit NULL into a BLOB colum also fails (the 3th insert), even though inserting an explicit NULL (the fourth one) does succeed.
CREATE TABLE testtable ( id INTEGER data BLOB );
INSERT INTO testtable (id, data) VALUES (0, BLOB '00');
INSERT INTO testtable (id, data) VALUES (1, BLOB '');
INSERT INTO testtable (id) VALUES (2);
INSERT INTO testtable (id, data) VALUES (2, NULL);
Can you make a bugreport out of this? Thanks.
Done, SF #1613902 Ronald
participants (2)
-
Ronald Oussoren
-
Sjoerd Mullender