pgsql: Set range table for CopyFrom() in tablesync

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Set range table for CopyFrom() in tablesync
Date: 2017-04-18 03:39:25
Message-ID: E1d0JzB-0004cp-Cf@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Set range table for CopyFrom() in tablesync

CopyFrom() needs a range table for formatting certain errors for
constraint violations.

This changes the mechanism of how the range table is passed to the
CopyFrom() executor state. We used to generate the range table and one
entry for the relation manually inside DoCopy(). Now we use
addRangeTableEntryForRelation() to setup the range table and relation
entry for the ParseState, which is then passed down by BeginCopyFrom().

Author: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Reported-by: Euler Taveira <euler(at)timbira(dot)com(dot)br>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e6242c18a5bb08788e6c4cc773952fc8e2a6291a

Modified Files
--------------
src/backend/commands/copy.c | 18 ++++++++----------
src/backend/replication/logical/tablesync.c | 9 +++++++--
2 files changed, 15 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2017-04-18 08:55:29 pgsql: Fix example on creating a trigger with a transition table.
Previous Message Alvaro Herrera 2017-04-17 21:37:37 pgsql: Rename columns in new pg_statistic_ext catalog