From: | Verena Ruff <lists(at)triosolutions(dot)at> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Transactions and unique constraint |
Date: | 2006-06-12 14:28:31 |
Message-ID: | 200606121628.32202.lists@triosolutions.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Sorry about that, please forget it. This works, it was my fault.
Verena
Am Montag, 12. Juni 2006 15:04 schrieb Verena Ruff:
> Hi everyone,
> I have a problem with 2 inherited tables and a primery key constraint.
>
> table a ( id serial primary key );
> table b () inherits (a);
> alter table b add constraint
>
> If I delete one record of a, and then insert the same values into b, there
> is an error telling me there is a duplicate key violating the unquie key
> constraint.
>
> This 2 queries are following directly each other in my PHP code. If I run
> the 2nd query (which inserts the values) afterwards with psql, it works. It
> seems like Postgres needs some time recognizing that the primary key isn't
> used any more. These queries are part of a transaction.
>
> Any hints how I get this working?
>
> Thanks,
> Verena
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | Keith D. Evans | 2006-06-12 14:40:07 | Re: Scheduled tasks |
Previous Message | Tom Lane | 2006-06-12 13:54:52 | Re: uh-oh |