Re: [GENERAL] Retrieving query results

2017-08-24 Thread Igor Korot
Michael et al, On Thu, Aug 24, 2017 at 6:57 PM, Michael Paquier wrote: > On Thu, Aug 24, 2017 at 11:56 PM, Tom Lane wrote: >> I haven't tried it, but it sure looks like it would, if you don't hit >> OOM first. pqAddTuple() isn't doing anything to guard against integer >> overflow. The lack of

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Igor Korot
Hi, On Thu, Aug 24, 2017 at 7:18 PM, Tom Lane wrote: > Igor Korot writes: >> So there is no way to retrieve an arbitrary number of rows from the query? >> That sucks... > > The restriction is on the number of rows in one PGresult, not the total > size of the query resul

[GENERAL] Problem during debugging

2017-08-26 Thread Igor Korot
Hi, ALL, I am trying to write a program that is using libpq. For testing purposes I am trying to connect to the remote server, which is running on my home network on a different machine. Sometimes during debugging my program crashes or just produces incorrect results. In this case I have to stop t

[GENERAL] libpq confusion

2017-09-19 Thread 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. How do I properly check if the record exists from libpq? -- Sent via pgsql-genera

Re: [GENERAL] libpq confusion

2017-09-20 Thread Igor Korot
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

Re: [GENERAL] libpq confusion

2017-09-20 Thread Igor Korot
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 P

Re: [GENERAL] libpq confusion

2017-09-20 Thread Igor Korot
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 >

<    1   2