Given a table like: create table foo (id bigint);
In PostgreSQL I can add a column with a foreign key constraint using a single alter table statement: alter table foo add column parent bigint references foo(id); h2 (1.3.154) doesn't like this (even when using MODE=PostgreSQL): [Error Code: 42000, SQL State: 42000] Syntax error in SQL statement "ALTER TABLE FOO ADD COLUMN PARENT BIGINT REFERENCES[*] FOO(ID) "; Instead I have to do this: alter table foo add column parent bigint; alter table foo add constraint parent_fk foreign key (parent) references foo(id); -- 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.
