Re: Calling stored function that returns a cursor from a libpq program

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Calling stored function that returns a cursor from a libpq program
Дата
Msg-id 23969.1250181829@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Calling stored function that returns a cursor from a libpq program  (Mazen Abdel-Rahman <saba.mazen@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Mazen Abdel-Rahman
Дата:
Сообщение: Re: Calling stored function that returns a cursor from a libpq program
Следующее
От: Greg Stark
Дата:
Сообщение: Re: ERROR: Too many updates/deletes within transaction (cmin