Re: almost there on a design

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: almost there on a design
Date: 2003-03-04 00:02:59
Message-ID: A8642A703Z82UP5YQPDPJ64C7ZUMK.3e63ed33@cal-lab
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to do 'cross constraints' between two tables using a transaction and:

SETCONSTRAINTSALLDEFERRED;

Or making both tables INITIALLY DEFERRED?

3/3/2003 12:54:17 PM, Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> wrote:

>
>On Mon, 3 Mar 2003, Dennis Gearon wrote:
>
>> 3/3/2003 10:25:12 AM, Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> wrote:
>>
>> If I create the necessary fields first in this order, no deferrment seems necessary:
>>
>> I'm thinking about trying to create a user which only has access to selects and stored
>> procedures, so the web interface can ONLY use functions which take place in a transaction and
>> take care of it that way.
>>
>> create an email,
>> create a usr
>> create a usr email.
>
>That'll work from a function (currently), but from straight commands,
>if you make it such that there must be a usremailaddrs row to make a usr,
>then the second will fail. If you try to make the usremailaddrs row
>first, it fails due to the foreign key.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-03-04 00:18:43 Re: almost there on a design
Previous Message Martijn van Oosterhout 2003-03-04 00:00:36 Re: wal-debug