Re: Insert result does not match record count

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Natalie Wenz <nataliewenz(at)ebureau(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert result does not match record count
Date: 2013-07-19 23:14:48
Message-ID: 24380.1374275688@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Natalie Wenz <nataliewenz(at)ebureau(dot)com> writes:
> I am moving some data from one table to another in 9.2.4, and keep seeing this strange scenario:
> ...
> So, my counts from the old and new tables match, but the result returned from the insert statement is sometimes a completely different number. (But not always.) I've checked my date ranges very carefully to make sure they match.

Perhaps you've got triggers or rules on the target table that are
suppressing some inserts?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message guxiaobo1982 2013-07-20 00:08:25 Reply: Can we specify transaction level
Previous Message Natalie Wenz 2013-07-19 22:20:13 Insert result does not match record count

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-07-19 23:23:01 Re: Proposal: template-ify (binary) extensions
Previous Message Tom Lane 2013-07-19 22:37:14 Isn't PLy_spi_execute_fetch_result completely broken?