Re: OFFTOPIC: PostgreSQL vs MySQL

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: OFFTOPIC: PostgreSQL vs MySQL
Дата
Msg-id Pine.LNX.4.44.0310100514210.32606-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: OFFTOPIC: PostgreSQL vs MySQL  (David Griffiths <dgriffiths@boats.com>)
Список pgsql-performance
On Thu, 9 Oct 2003, David Griffiths wrote:

> > > "PostgreSQL supports constraints. MySQL doesn't; programmers need to
> > > take care of that from the client side"
> > > Again, InnoDB supports constraints.
> >
> > Really?  This is news.   We did some tests on constraints on InnoDB, and
> > found that while they parsed, they were not actually enforced.    Was
> > our test in error?
>
> You may have turned them off to load data? I've run into constraints
> when my data-load script missed some rows in address_type. When it went
> to do the address_list table, all rows that had the missing address_type
> failed, as they should. I saw no weakness in the constraints.

It sounds like you talk about foreign keys only, while the previous writer
talkes about other constraints also. For example, in postgresql you
can do:

CREATE TABLE foo (
  x int,

  CONSTRAINT bar CHECK (x > 5)
);

and then

# INSERT INTO foo VALUES (4);
ERROR:  ExecInsert: rejected due to CHECK constraint "bar" on "foo"


I don't know MySQL, but I've got the impression from other posts on the
lists that innodb supports foreign keys only. I might be wrong though.

--
/Dennis


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Speeding up Aggregates
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Sun performance - Major discovery!