INSERT to partitioned table doesn't return row count

From: Kris Deugau <kdeugau(at)vianet(dot)ca>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: INSERT to partitioned table doesn't return row count
Date: 2014-12-03 19:19:47
Message-ID: 547F6253.60200@vianet.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to return the number of rows inserted to a partitioned
table set up as per the examples on
http://www.postgresql.org/docs/9.1/interactive/ddl-partitioning.html, in
the same way as if you inserted directly into a target table?

I can sort of see why it returns 0, because 0 rows are actually inserted
in the parent table, but I'd prefer not to have to make all the code
around this use case partition-aware; most of it isn't mine.

I tried modifying the last RETURN line in the trigger function but
couldn't find anything that was even valid syntax.

-kgd

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2014-12-03 20:05:32 Re: Merge rows based on Levenshtein distance
Previous Message mongoose 2014-12-03 19:00:14 Re: Merge rows based on Levenshtein distance