Re: Number of updated rows with LibPQ

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Number of updated rows with LibPQ
Дата
Msg-id CAECtzeXSW-Tn_eA2WGL3X+Dw5bfzujtuVeXFQZpa9ukc=7Kv_Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Number of updated rows with LibPQ  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
Le ven. 14 oct. 2022 à 13:52, Dominique Devienne <ddevienne@gmail.com> a écrit :
On Wed, Oct 5, 2022 at 8:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > On Wed, 2022-10-05 at 16:38 +0200, Dominique Devienne wrote:
> > Yes, you have to use PQcmdTuples(), and you have to convert the string to an integer.
> > But don't worry: the result will *not* be "INSERT 0 5", it will be just "5"

Thanks. What's the leading 0 though, then?

The leading number was the OID of the inserted row if you only had one row and if the table had OID on rows. Otherwise, it was zero. It's always 0 nowadays since you can't have OID on rows.


--
Guillaume.

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

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: Re: Number of updated rows with LibPQ
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Number of updated rows with LibPQ