Re: CREATE TABLE with REFERENCE

From: Jonathan Bartlett <johnnyb(at)eskimo(dot)com>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: "kay-uwe(dot)genz" <kug1977(at)web(dot)de>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: CREATE TABLE with REFERENCE
Date: 2003-07-28 20:55:26
Message-ID: Pine.GSU.4.44.0307281353580.8808-100000@eskimo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> >Why not just drop the "references" clause? I mean, the point of having
> >transactions is to guarantee integrity within a transaction, if you're not
> >going to have that, why even bother with the clause?
> >
> Quite the opposite - the point is to guaratee the integrity *outside*
> the transaction.

That's actually what I was saying. Within a single transaction rather
than across multiple transactions. If you have to go across multiple
transactions, there's no real point in having integrity constraints.

> >Most of my databases don't even user "references", just because I like the
> >flexibility, and I have multitable keys (keys that can refer to rows from
> >multiple tables).
> >
> >
> Not much to brag about :-)

Do you know of a better way to handle multitable references?

Jon

>
> Dima
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco J Reyes 2003-07-28 20:59:07 Re: comparing database schema's
Previous Message Terence Chang 2003-07-28 20:38:34 Clone a database to other machine