psql and INSERT/UPDATE/DELETE RETURNING

Поиск
Список
Период
Сортировка
От Tom Lane
Тема psql and INSERT/UPDATE/DELETE RETURNING
Дата
Msg-id 23362.1155351492@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: psql and INSERT/UPDATE/DELETE RETURNING
Список pgsql-hackers
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?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Allow commenting of variables in postgresql.conf to restore them
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: [PATCHES] Forcing current WAL file to be archived