Re: PQcmdTuples() declaration

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQcmdTuples() declaration
Дата
Msg-id 5860.1036768512@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PQcmdTuples() declaration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: PQcmdTuples() declaration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-interfaces
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The issue with PQcmdTuples() and PQcmdStatus() are that they return
> *result structure member pointers.  The patch makes the *result a const,
> then we have to return the values as const's.  The code compiled OK, so
> I assume that is fine.  How does that sound to others, or should we keep
> the result non-const?

Adding a const to the result type will break client applications that
aren't expecting it.  I don't think we can get away with that.

We could still declare the input type as const if we were willing to
cast away const inside the functions, but that seems pretty ugly.
        regards, tom lane


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Payman
Дата:
Сообщение: Re: PQcmdTuples() declaration
Следующее
От: yren@cc3.com (Yanjie Ren)
Дата:
Сообщение: pgAdmin II error