Re: Bidirectional hard joins (fwd)

From: Curt Sampson <cjs(at)cynic(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: ivan(at)xray(dot)sai(dot)msu(dot)ru
Subject: Re: Bidirectional hard joins (fwd)
Date: 2002-04-12 08:59:16
Message-ID: Pine.NEB.4.43.0204121750180.1397-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


While I like the optimisation, the SQL syntax seems pretty horrible.
Could it not be done without changing the syntax at all, except to
change slightly how one defines a column? Given something like

CREATE TABLE item_name (
item_id INT PRIMARY KEY,
item_name VARCHAR(255)
)
CREATE TABLE item_set (
item_set_id INT PRIMARY KEY,
item_id INT REFERENCES item_name (item_id)
ON UPDATE CASCADE ON DELETE CASCADE
)

it seems to me that it would be possible for the database to
transparently implement this using the optimisation described.
Given that, maybe one could just add another keyword to the REFERENCES
statement that would actually do the reference with a "pointer"?

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2002-04-12 09:12:28 Disregard my last message
Previous Message John Gray 2002-04-12 08:48:34 Re: command.c breakup