From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: libpq confusion |
Date: | 2017-09-20 17:42:08 |
Message-ID: | 510d23a6-ea15-90ae-fbef-d30c76817b34@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 the potentially
confusing wording.
If the result status isPGRES_TUPLES_OK, then the functions described
below can be used to retrieve the rows returned by the query. Note
that aSELECTcommand that happens to retrieve zero rows still
showsPGRES_TUPLES_OK.PGRES_COMMAND_OKis for commands that can never
return rows (INSERT,UPDATE, etc.). A response
ofPGRES_EMPTY_QUERYmight indicate a bug in the client software.
--
john r pierce, recycling bits in santa cruz
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Korot | 2017-09-20 17:47:05 | Re: libpq confusion |
Previous Message | Igor Korot | 2017-09-20 17:34:04 | Re: libpq confusion |