Re: [GENERAL] libpq confusion

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [GENERAL] libpq confusion
Дата
Msg-id 571a3088-8b6d-20ea-7741-39945b062efb@hogranch.com
обсуждение исходный текст
Ответ на Re: [GENERAL] libpq confusion  (Igor Korot <ikorot01@gmail.com>)
Ответы Re: [GENERAL] libpq confusion  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-general
On 9/20/2017 6:30 AM, Igor Korot wrote:
Hi, guys,

On Wed, Sep 20, 2017 at 12:20 AM, Allan Harvey
<allan.harvey@libertyonesteel.com> wrote:
How do I properly check if the record exists from libpq?
Igor,
I use PQntuples() to check the number of ... tuples, for > 0
I was actually curious - isn't it what "PGRES_COMMAND_OK" for?
IIUC, this constant indicates successful query run, but no records was
generated.

Or am I missing something and I will have to check PQntuples()?


a query that returns zero rows is still successful.

-- 
john r pierce, recycling bits in santa cruz

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: [GENERAL] Insert large number of records
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] [HACKERS] USER Profiles for PostgreSQL