Re: value

From: Gissur Þórhallsson <gissur(at)loftmyndir(dot)is>
To: pgsql-general(at)postgresql(dot)org
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Subject: Re: value
Date: 2010-09-16 23:44:06
Message-ID: AANLkTimXGZ1iSKSNSo9bDjVQUOmVLxFQ8xm=MqUR8eXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> OK, but you still need to be careful. That trick will only work if you
> insert rows one at a time into the table. If you have a single insert
> that inserts multiple rows (as in my example), it would fail because
> the currval() call would return the same value for each row in the
> insert created by the rule.
>

My advice would be to convert to triggers.
>

After going over your example a bit better, I think I will follow your
advice.
Thanks a lot for the heads up.

Kind regards from Iceland,
Gissur Þórhallsson

In response to

  • Re: value at 2010-09-16 17:04:29 from Dean Rasheed

Browse pgsql-general by date

  From Date Subject
Next Message Florian Weimer 2010-09-17 08:13:46 Re: Simple schema diff script in Perl
Previous Message hans 2010-09-16 23:18:52 Re: Simple schema diff script in Perl