From: | Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgresql vs mysql |
Date: | 2007-03-04 13:44:25 |
Message-ID: | 20070304144425.1ec70be4.adsmail@wars-nicht.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello all,
On Wed, 21 Feb 2007 10:02:04 -0600
Scott Marlowe <smarlowe(at)g2switchworks(dot)com> wrote:
> It swallows column level foreign key contraints and does nothing with
> them, no errors nothing, even if you're defining innodb tables. I.e.
> this produces not errors:
>
> mysql> create table a (id int primary key) engine=innodb;
> Query OK, 0 rows affected (0.02 sec)
>
> mysql> create table b (a_id int references a(id)) engine=innodb;
> Query OK, 0 rows affected (0.03 sec)
>
> mysql> insert into a values (1);
> Query OK, 1 row affected (0.03 sec)
>
> mysql> insert into b values (1);
> Query OK, 1 row affected (0.03 sec)
>
> mysql> insert into b values (2);
> Query OK, 1 row affected (0.03 sec)
>
> That last statement should fail. Or the creation of table b should
> throw a warning. Or something.
It will not fail, cause REFERENCES without FOREIGN KEY get's ignored :-(
Thats documented somewhere, but not really fixed, cause standard '92
says, just writing REFERENCE is ok. Oh, and no warning at all, since it
is a valid (but ignored) language thing of Mysql.
Kind regards
--
Andreas 'ads' Scherbaum
Failure is not an option. It comes bundled with your Microsoft product.
(Ferenc Mantfeld)
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas 'ads' Scherbaum | 2007-03-04 13:53:16 | Re: postgresql vs mysql |
Previous Message | Andreas 'ads' Scherbaum | 2007-03-04 13:39:13 | Re: postgresql vs mysql |