Re: BUG #17745: RETURNING after INSERT does not return the same structure of response

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "pawel(dot)jan(dot)podgorski(at)gmail(dot)com" <pawel(dot)jan(dot)podgorski(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17745: RETURNING after INSERT does not return the same structure of response
Date: 2023-01-11 13:22:26
Message-ID: CAKFQuwZgvtcGqVOcbUjb3K7ipD19Ldm-UbwaWogkEWJ-smy2Kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, January 11, 2023, PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 17745
> Logged by: Paweł Podgórski
> Email address: pawel(dot)jan(dot)podgorski(at)gmail(dot)com
> PostgreSQL version: 14.5
> Operating system: Windows 11
> Description:
>
> When I try to "INSERT INTO .... RETURNING (channel)" the output is:
> channel
> --------------
> 3o0mNjcS4CMr
> (1 row)
>
> But RETURNING multiple attributes produces another output:
> "INSERT INTO .... RETURNING ( channel , last_processing_timestamp,
> last_successful_processing_timestamp )"
> row
> ------------------------------------------------------------
> --------------------
> (3o0mNjcS4CMr,"2023-01-11 12:01:40.016988+01","2023-01-11
> 12:01:40.016988+01")
> (1 row)
>
> The output that is expected is similar to:
> "INSERT INTO .... RETURNING channel , last_processing_timestamp,
> last_successful_processing_timestamp "
> channel | last_processing_timestamp |
> last_successful_processing_timestamp
> --------------+-------------------------------+-------------
> -------------------------
> 3o0mNjcS4CMr | 2023-01-11 12:01:40.016988+01 | 2023-01-11
> 12:01:40.016988+01
> (1 row)
>
>
If you don’t want a composite returned don’t put parentheses around the
column list.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-01-11 15:09:21 BUG #17746: Partitioning by hash of a text depends on icu version when text collation is not deterministic
Previous Message PG Bug reporting form 2023-01-11 11:22:39 BUG #17745: RETURNING after INSERT does not return the same structure of response