Re: OFFTOPIC: PostgreSQL vs MySQL

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: David Griffiths <dgriffiths(at)boats(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: OFFTOPIC: PostgreSQL vs MySQL
Date: 2003-10-10 03:21:24
Message-ID: Pine.LNX.4.44.0310100514210.32606-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy 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

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Shridhar Daithankar 2003-10-10 07:43:09 Re: OFFTOPIC: PostgreSQL vs MySQL
Previous Message Josh Berkus 2003-10-10 00:29:59 Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Conway 2003-10-10 03:54:53 Re: Sun performance - Major discovery!
Previous Message Bruno Wolff III 2003-10-10 01:35:22 Re: Speeding up Aggregates