Re: OFFTOPIC: PostgreSQL vs MySQL - Mailing list pgsql-performance

From Dennis Bjorklund
Subject Re: OFFTOPIC: PostgreSQL vs MySQL
Date
Msg-id Pine.LNX.4.44.0310100514210.32606-100000@zigo.dhs.org
Whole thread Raw
In response to Re: OFFTOPIC: PostgreSQL vs MySQL  (David Griffiths <dgriffiths@boats.com>)
List 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 by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Speeding up Aggregates
Next
From: Neil Conway
Date:
Subject: Re: Sun performance - Major discovery!