Re: [GENERAL] libpq confusion - Mailing list pgsql-general

From Igor Korot
Subject Re: [GENERAL] libpq confusion
Date
Msg-id CA+FnnTw5y-FU1C_8cZ-rCTGVkr-z6nZctRnVb+MdUzu6=r4h=A@mail.gmail.com
Whole thread Raw
In response to [GENERAL] libpq confusion  (Igor Korot <ikorot01@gmail.com>)
Responses Re: [GENERAL] libpq confusion
List pgsql-general
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()?

Thank you.

>
> Allan
>
> ______________________________________________________________________
> This e-mail message may contain confidential or legally privileged information and is only for the use of the
intendedrecipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in
relianceon the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as
theycan be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have
acceptedthese risks. GFG Alliance Australia and its related bodies corporate and the sender are not responsible for
errorsor omissions in this message and deny any responsibility for any damage arising from the use of this e-mail. Any
opinionand other statement contained in this message and any attachment are solely those of the author and do not
necessarilyrepresent those of the company. All and any rights as to confidentiality, legal professional privilege and
copyrightare expressly reserved. 


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: "Yason TR"
Date:
Subject: Re: [GENERAL] JDBC: logical replication and LSN feedback
Next
From: Stephen Frost
Date:
Subject: Re: [GENERAL] [HACKERS] USER Profiles for PostgreSQL