Re: PG_DIAG_STATEMENT_POSITION Where is it defined?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
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-18 05:28:03
Message-ID: 20060518052803.GA32755@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 17, 2006 at 03:58:21PM -0500, Tony Caduto wrote:
> Tony Caduto wrote:
> >http://www.postgresql.org/docs/8.1/static/libpq-exec.html
> >it should be a integer not 'P'
> >
> 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 :-)

Hardly cryptic, it's a fairly common tactic if you need an integer to
represent something and you don't particularly care what integer, but
the character can be more meaningful. A char *is* an integer, just only
one byte, not four.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Florian Weimer 2006-05-18 05:28:30 Re: Announce: GPL Framework centered on Postgres
Previous Message Florian Weimer 2006-05-18 05:25:09 Re: Announce: GPL Framework centered on Postgres