Create table statement not working after upgrade to 1.3.165

25 views
Skip to first unread message

user

unread,
Apr 20, 2012, 1:30:32 AM4/20/12
to H2 Database
Hi,

FYI The following create table statement does not work -

create table public.Data (iden text not null, value text, primary key
(iden));

It seems as though h2 doesn't like the "not null" part of the create
table statement. Note that this works on an older version (1.0.72)

If I execute -

create table public.Data (iden text, value text, primary key (iden));

on 1.3.165 it works fine.

Cheers

Noel Grandin

unread,
Apr 20, 2012, 5:46:29 AM4/20/12
to h2-da...@googlegroups.com, user
what exactly is the error message?

Steve McLeod

unread,
Apr 21, 2012, 6:37:03 AM4/21/12
to h2-da...@googlegroups.com
I tried create table public.Data (iden text, value text, primary key (iden)); 
 and it didn't work. I got an error, which I expected. Since an update a while back, you can no longer create an index on a TEXT field.

From the changelog for Version 1.3.158 (2011-07-17):
It is now longer allowed to create an index on a CLOB or BLOB column (except for in-memory databases or indexes), because recovery doesn't work on such columns. Fulltext indexes on such column are still supported of course.

user

unread,
Apr 23, 2012, 2:42:44 AM4/23/12
to h2-da...@googlegroups.com
Hi,

The exact error I got when I executed -

"create table public.Data (iden text not null, value text, primary key)"

was
ok that's great thanks - much appreciated!

Cheers

Thomas Mueller

unread,
Apr 24, 2012, 2:19:07 AM4/24/12
to h2-da...@googlegroups.com
Hi,

Could you use varchar instead of text?

create table public.Data (iden varchar not null, value text, primary key (iden));

Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/PEq-fpxN4eUJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Dermot Smyth

unread,
Apr 24, 2012, 2:27:21 AM4/24/12
to h2-da...@googlegroups.com
Hi,

Yup that's what I've done now - works fine.

Thanks again!
Reply all
Reply to author
Forward
0 new messages