Re: Why is MySQL more chosen over PostgreSQL?

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Sander Steffann <sander(at)steffann(dot)nl>
Cc: Jeff Davis <list-pgsql-hackers(at)empires(dot)org>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why is MySQL more chosen over PostgreSQL?
Date: 2002-08-07 02:41:54
Message-ID: Pine.NEB.4.44.0208071134300.1214-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 3 Aug 2002, Sander Steffann wrote:

> I have this problem in a few real-life cases, so if you have a sollution to
> this, I would realy appreciate it!

Add a card_type column to your main table, and insert something
indicating the value of the card type there.

That won't stop you from having entries for the card in both
network_card and sound_card, but one of those entries will be
meaningless extra data.

Of course, this also means you have to go back to the relational
model to select all your network cards. Doing

SELECT * FROM network_card

may also return (incorrectly inserted) non-network cards, if your
data are not clean, but

SELECT card.card_id, card.whatever, network_card.*
FROM card, network_card
WHERE card.card_id = network_card.card_id
AND card.type = 'N'

is guaranteed to return correct results. And of course you can just
make that a view called network_card, and the same statement as
you used with the inerhited table will work.

Oops, did I just replace your "object-oriented" system with a
relational one that does everything just as easily, and even does
something the object-oriented one can't do? Sorry about that. :-)

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2002-08-07 03:07:38 Re: CLUSTER and indisclustered
Previous Message Bruce Momjian 2002-08-07 02:39:25 Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.c