Igor Korot writes:
> However it leads to another question - should PQclear set the pointer to NULL?
C doesn't provide any reasonable way to do that. The argument of PQclear
needn't even be an lvalue; for example, if you're not too concerned about
error checking, it's not unreasonable to write
Hi, guys,
On Fri, Aug 4, 2017 at 5:01 PM, Tom Lane wrote:
> Igor Korot writes:
>> I have a following piece of code:
>
>> [code]
>> PGresult *res = PQexecPrepared();
>> status = PQresultStatue( res );
>> if( status == PGRES_TUPLES_OK )
>> {
>> for( int j = 0; j < PQntuples( res ); j++ )
>>
Igor Korot writes:
> I have a following piece of code:
> [code]
> PGresult *res = PQexecPrepared();
> status = PQresultStatue( res );
> if( status == PGRES_TUPLES_OK )
> {
> for( int j = 0; j < PQntuples( res ); j++ )
> {
> char *foo = PQgetValue( res, j, 0 );
> char *bar
Hi, Michael,
On Fri, Aug 4, 2017 at 3:26 PM, Michael Paquier
wrote:
> On Fri, Aug 4, 2017 at 9:12 PM, Igor Korot wrote:
>> Am I missing something? How do I fix the crash?
>
> Based on what I can see here, I see nothing wrong. Now it is hard to
> reach any conclusion with the limited information
On Fri, Aug 4, 2017 at 9:12 PM, Igor Korot wrote:
> Am I missing something? How do I fix the crash?
Based on what I can see here, I see nothing wrong. Now it is hard to
reach any conclusion with the limited information you are providing.
--
Michael
--
Sent via pgsql-general mailing list (pgsq
Hi, ALL,
I have a following piece of code:
[code]
PGresult *res = PQexecPrepared();
status = PQresultStatue( res );
if( status == PGRES_TUPLES_OK )
{
for( int j = 0; j < PQntuples( res ); j++ )
{
char *foo = PQgetValue( res, j, 0 );
char *bar = PQgetValue( res, j, 1 );