Re: PG_DIAG_STATEMENT_POSITION Where is it defined?

From: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
To: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG_DIAG_STATEMENT_POSITION Where is it defined?
Date: 2006-05-17 20:58:21
Message-ID: 446B8E6D.3080102@amsoftwaredesign.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emi Lu 2006-05-17 21:20:49 Add column and specify the column position in a table
Previous Message Tony Caduto 2006-05-17 20:41:54 Re: PG_DIAG_STATEMENT_POSITION Where is it defined?