pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17745: RETURNING after INSERT does not return the same structure of response
2+ messages / 2 participants
[nested] [flat]

* BUG #17745: RETURNING after INSERT does not return the same structure of response
@ 2023-01-11 11:22  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2023-01-11 11:22 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: pawel.jan.podgorski@gmail.com

The following bug has been logged on the website:

Bug reference:      17745
Logged by:          Paweł Podgórski
Email address:      pawel.jan.podgorski@gmail.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)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17745: RETURNING after INSERT does not return the same structure of response
@ 2023-01-11 13:22  David G. Johnston <david.g.johnston@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2023-01-11 13:22 UTC (permalink / raw)
  To: pawel.jan.podgorski@gmail.com <pawel.jan.podgorski@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Wednesday, January 11, 2023, PG Bug reporting form <
noreply@postgresql.org> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      17745
> Logged by:          Paweł Podgórski
> Email address:      pawel.jan.podgorski@gmail.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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-01-11 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 11:22 BUG #17745: RETURNING after INSERT does not return the same structure of response PG Bug reporting form <noreply@postgresql.org>
2023-01-11 13:22 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox