Re: Calling stored function that returns a cursor from a libpq program - Mailing list pgsql-novice

From Tom Lane
Subject Re: Calling stored function that returns a cursor from a libpq program
Date
Msg-id 23969.1250181829@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calling stored function that returns a cursor from a libpq program  (Mazen Abdel-Rahman <saba.mazen@gmail.com>)
List pgsql-novice
Mazen Abdel-Rahman <saba.mazen@gmail.com> writes:
>  //get the name of the returned cursor

> char * cursorReturned;

> cursorReturned = PQgetvalue(queryResult4, 0, 0);

>  NSString * fetchNextQuery = [NSString stringWithFormat:@"FETCH ALL in %s",
> cursorReturned];

I'd try double quoting that, ie
    stringWithFormat:@"FETCH ALL in \"%s\"",

As-is you're risking trouble with mixed-case names, which is what you
seem to be using.

            regards, tom lane

pgsql-novice by date:

Previous
From: Mazen Abdel-Rahman
Date:
Subject: Re: Calling stored function that returns a cursor from a libpq program
Next
From: Greg Stark
Date:
Subject: Re: ERROR: Too many updates/deletes within transaction (cmin