Re: Buglist

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Buglist
Дата
Msg-id Pine.LNX.4.33.0308191500450.10475-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: Buglist  (Bo Lorentsen <bl@netgroup.dk>)
Ответы Re: Buglist  (Bo Lorentsen <bl@netgroup.dk>)
Re: Buglist  (Ian Barwick <barwick@gmx.net>)
Список pgsql-general
On 19 Aug 2003, Bo Lorentsen wrote:

> On Tue, 2003-08-19 at 18:17, Vivek Khera wrote:
>
> > Since the beginning of time (at least MySQL v3.22) MySQL has silently
> > ignored the foreign key references in table create statement.  Now
> > that they have foreign key support (version 4.x), do they honor those
> > statements?  Nope.  You have to use their own syntax to declare your
> > FKs.  They still silently ignore the references in the table create
> > statements.
> Is this really true ?? Does 4.x still not support FK, then how about
> transactions, does they that not work too ?
>
> Is this not just the MyISAM tables that still got the problem (they are
> verison 3.x) ?

No, the problem is that in SQL spec, you do it with the foreign key
declaration inside parnes in the create statement like:

create table abc123
(
  id serial unique,
  info text);
create table abc1234
(
  moreinfo text,
  ref_id int,
  foreign key (ref_id)
  references abc123(id)
  on delete cascade
);

In MySQL this syntax is silently swallowed, while their own "proper"
syntax is like this:

create table abc123
(
  id serial unique,
  info text)
type=innodb;
create table abc1234
(
  moreinfo text,
  ref_id int)
foreign key (ref_id) references abc123(id)
on delete CASCADE
type=innodb;

So the syntaxes are different, and one is apparently swallowed without
error or anything, but in fact you have no fks in place.



В списке pgsql-general по дате отправления:

Предыдущее
От: "Sander Steffann"
Дата:
Сообщение: Re: 7.3.4 RPM
Следующее
От: Bo Lorentsen
Дата:
Сообщение: Re: Buglist