On Wednesday, September 20, 2017 1:47:05 PM EDT Igor Korot wrote:
>Thx.
>So it is referring to the command not a "command returning no data". ;-)
assuming
create table t (c int);
select c from t;
- PQresultStatus(result) == PGRES_TUPLES_OK
- PQntuples(result) == number or
Thx.
So it is referring to the command not a "command returning no data". ;-)
On Wed, Sep 20, 2017 at 1:42 PM, John R Pierce wrote:
> On 9/20/2017 10:34 AM, Igor Korot wrote:
>
> >From the documentation:
> https://www.postgresql.org/docs/9.1/static/libpq-exec.html
>
> [quote]
> PGRES_COMMAND_OK
>
On 9/20/2017 10:34 AM, Igor Korot wrote:
>From the documentation:
https://www.postgresql.org/docs/9.1/static/libpq-exec.html
[quote]
PGRES_COMMAND_OK
Successful completion of a command returning no data.
[/quote]
No data = no rows, right?
from that same page, a bit farther down, clarifying t
Hi, John,
On Wed, Sep 20, 2017 at 12:02 PM, John R Pierce wrote:
> On 9/20/2017 6:30 AM, Igor Korot wrote:
>
> Hi, guys,
>
> On Wed, Sep 20, 2017 at 12:20 AM, Allan Harvey
> wrote:
>
> How do I properly check if the record exists from libpq?
>
> Igor,
> I use PQntuples() to check the number of .
On 9/20/2017 6:30 AM, Igor Korot wrote:
Hi, guys,
On Wed, Sep 20, 2017 at 12:20 AM, Allan Harvey
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?
>How do I properly check if the record exists from libpq?
Igor,
I use PQntuples() to check the number of ... tuples, for > 0
Allan
__
This e-mail message may contain confidential or legally privileged information
and is only f
Hi, guys,
On Wed, Sep 20, 2017 at 12:20 AM, Allan Harvey
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 succe
2017-09-20 5:36 GMT+02:00 Igor Korot :
> Hi, ALL,
>
> draft=# SELECT 1 FROM abcattbl WHERE abt_tnam = 'leagues';
> ?column?
> --
> (0 rows)
>
>
> However running it thru the PQexecParam() I am getting "PGRES_TUPLES_OK"
> which means that the such record exist.
>
That means so this comman
Hi, ALL,
draft=# SELECT 1 FROM abcattbl WHERE abt_tnam = 'leagues';
?column?
--
(0 rows)
However running it thru the PQexecParam() I am getting "PGRES_TUPLES_OK"
which means that the such record exist.
How do I properly check if the record exists from libpq?
--
Sent via pgsql-genera