Re: Unexpected behavior with transition tables in update statement trigger

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tom Kazimiers <tom(at)voodoo-arts(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unexpected behavior with transition tables in update statement trigger
Date: 2018-02-27 21:27:23
Message-ID: CAEepm=3mBBHij-YQwgUmj2zvNs4q8KjYb5j10dnKpuCfXhk1PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Feb 28, 2018 at 9:58 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
>> Here's a new version with tuplestore_select_read_pointer() added in
>> another place where it was lacking, and commit message. Moving to
>> -hackers, where patches go.
>
> Pushed, along with a regression test based on your example.
> Unfortunately, this came in a bit too late for this week's releases :-(

Thanks!

Tom K, if you need a workaround before 10.4 comes out in May[1], you
could try selecting the whole transition table into a CTE up front.
Something like WITH my_copy AS (SELECT * FROM new_table) SELECT * FROM
my_copy UNION ALL SELECT * FROM my_copy should work.

[1] https://www.postgresql.org/developer/roadmap/

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Kazimiers 2018-02-27 21:40:32 Re: Unexpected behavior with transition tables in update statement trigger
Previous Message David G. Johnston 2018-02-27 21:18:52 Re: index-only-scan when there is an index on all columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Kazimiers 2018-02-27 21:40:32 Re: Unexpected behavior with transition tables in update statement trigger
Previous Message David Steele 2018-02-27 21:16:29 Re: PATCH: Exclude unlogged tables from base backups