Re: psql and INSERT/UPDATE/DELETE RETURNING

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: psql and INSERT/UPDATE/DELETE RETURNING
Date: 2006-08-12 20:06:37
Message-ID: 20060812200637.GA19427@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 11, 2006 at 10:58:12PM -0400, Tom Lane wrote:
> Currently, psql does not show the command completion tag if it gets a
> PGRES_TUPLES_OK result. This means you won't see the tag for a command
> with RETURNING, eg
>
> regression=# insert into int8_tbl values(1,2),(3,4);
> INSERT 0 2
> regression=# insert into int8_tbl values(1,2),(3,4) returning *;
> q1 | q2
> ----+----
> 1 | 2
> 3 | 4
> (2 rows)
>
> regression=#
>
> The tag is actually being sent by the backend, it's just not displayed.
>
> Do we like this behavior? The number-of-tuples part of the tag is
> certainly redundant with the table display, but perhaps it's good to
> have a reminder that the rows you are looking at were just INSERTed,
> UPDATEd, or DELETEd. I haven't checked the code but I imagine it'd
> not be very difficult to change the behavior if we wish.
>
> Comments?

Having both would be good :)

Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-08-12 20:16:57 Re: [PATCHES] extension for sql update
Previous Message Francisco Figueiredo Jr. 2006-08-12 19:59:37 SIg11 on suse linux