Re: Returning empty on insert

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Returning empty on insert
Дата
Msg-id CAKJS1f9CitKTCObBCs2c8qhfJsX9xYG4MRvB+Mmd=u90oizyaA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Returning empty on insert  (Winanjaya Amijoyo <winanjaya.amijoyo@gmail.com>)
Ответы Re: Returning empty on insert  (Winanjaya Amijoyo <winanjaya.amijoyo@gmail.com>)
Список pgsql-general
On Thu, 16 May 2019 at 20:28, Winanjaya Amijoyo
<winanjaya.amijoyo@gmail.com> wrote:
> column pid is bigserial that I expect to return on both insert and update
> I don't want to use ON CONFLICT since it would increasing the sequence although it updating the data

It's not very clear what you're trying to do here.

So, by "pid returns empty", you mean that the UPDATE updates 0 rows,
and you always expect it to update 1 row?   The UPDATE is going to
update 0 rows if either "s" is an empty relation, or there's no row in
"area" with the "pid" that's in "s".  "s" will be an empty relation if
"test" does not have any row matching WHERE area = 'test5'.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Returning empty on insert
Следующее
От: Winanjaya Amijoyo
Дата:
Сообщение: Re: Returning empty on insert