Re: Adding OLD/NEW support to RETURNING

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Adding OLD/NEW support to RETURNING
Date: 2024-07-12 17:22:09
Message-ID: CAEZATCXWT1MEsnkwqkg3ewJV1HqQsEMNriDwTYtt6BXVx6oYTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 26 Jun 2024 at 12:18, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>
> I've added a new elog() error check to
> adjust_appendrel_attrs_mutator(), similar to the existing one for
> varnullingrels, to report if we ever attempt to apply a non-default
> varreturningtype to a non-Var, which should never be possible, but
> seems worth checking. (non-Var expressions should only occur if we've
> flattened a UNION ALL query, so shouldn't apply to the target relation
> of a data-modifying query with RETURNING.)
>

New version attached, updating an earlier comment in
adjust_appendrel_attrs_mutator() that I had missed.

Regards,
Dean

Attachment Content-Type Size
support-returning-old-new-v11.patch text/x-patch 234.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-07-12 17:45:32 Re: gcc 13 warnings
Previous Message Sami Imseih 2024-07-12 17:14:56 Re: Restart pg_usleep when interrupted