insert into user_info(user_info_id) values ('9');
insert into user_info(user_info_id) values('09');
insert into user_ref(user_ref_id) values (009);
The user_ref entry now points to which user_info record?
If "select 'x' from dual" caused postgres to crash what should h2 do?
On Oct 10, 8:05 am, "Thomas Mueller" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> > In Oracle, this will throw an error. Any chance H2 can do the same?
>
> It doesn't throw an exception in PostgreSQL. If it would throw an
> exception in H2, then H2 wouldn't be compatible with PostgreSQL.
>
> alter table user_ref drop CONSTRAINT ui_ur_fk;
> drop table user_info;
> drop table user_ref;
> CREATE TABLE user_info ( user_info_id VARCHAR(32) NOT NULL,
> user_password_md5 VARCHAR(32) NOT NULL);
> ALTER TABLE user_info ADD CONSTRAINT user_info_pk PRIMARY KEY(user_info_id);
> CREATE TABLE user_ref ( user_ref_id VARCHAR(32) NOT NULL, user_info_id
> INT NOT NULL, some_info VARCHAR(32));
> ALTER TABLE user_ref ADD CONSTRAINT user_ref_pk PRIMARY KEY(user_ref_id);
> ALTER TABLE user_ref ADD CONSTRAINT ui_ur_fk FOREIGN KEY(user_info_id)
> REFERENCES user_info(user_info_id);
>
> Regards,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---