Re: lastval()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Abhijit Menon-Sen <ams(at)oryx(dot)com>, Neil Conway <neilc(at)samurai(dot)com>, db(at)zigo(dot)dhs(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: lastval()
Date: 2005-05-11 05:28:16
Message-ID: 501.1115789296@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Abhijit Menon-Sen wrote:
>> By the way, what would lastval() do if an insert trigger inserts a row
>> into a table with another serial column?

> It fails, just like it would fail now if the trigger inserted into the
> same table that used the trigger, or a rule.

If it actually *failed* that would be one thing, but the proposed
patch does not do that. It looks more like the philosophy we usually
denigrate MySQL for, viz never fail even if you are staring a certain
application bug in the face.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2005-05-11 09:36:44 Re: Hashagg planning bug (8.0.1)
Previous Message Tom Lane 2005-05-11 04:58:38 Re: --enable-thread-safety?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-05-11 05:41:09 Re: lastval()
Previous Message Tom Lane 2005-05-11 05:23:06 Re: refactor index build