Re: PG_DIAG_STATEMENT_POSITION Where is it defined?

Поиск
Список
Период
Сортировка
От Tony Caduto
Тема Re: PG_DIAG_STATEMENT_POSITION Where is it defined?
Дата
Msg-id 446B8E6D.3080102@amsoftwaredesign.com
обсуждение исходный текст
Ответ на Re: PG_DIAG_STATEMENT_POSITION Where is it defined?  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Ответы Re: PG_DIAG_STATEMENT_POSITION Where is it defined?  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Tony Caduto wrote:
> Martijn van Oosterhout wrote:
>> src/include/postgres_ext.h
>>
>>
> I did  use grep but I am confused by what it showed,
>
> according to the docs:
> http://www.postgresql.org/docs/8.1/static/libpq-exec.html
> it should be a integer not 'P'
>
> Those symbols are used by PQresultErrorField which expects a integer
> value.
>
> Thanks,
>
I got it working, in Pascal you have to pass P as ord('P')

PQresultErrorField(fstatement,ord('P'));

It's one of those cryptic ways you can use a char as a integer in C :-)

--
Tony


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

Предыдущее
От: Tony Caduto
Дата:
Сообщение: Re: PG_DIAG_STATEMENT_POSITION Where is it defined?
Следующее
От: Emi Lu
Дата:
Сообщение: Add column and specify the column position in a table