From: Jonah H. Harris <jonah.harris@gmail.com>
To: clarkhorse@clarktx.com
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Newbie problem with from database in C
Date: Tue, 20 May 2008 09:36:03 -0400
Message-ID: <36e682920805200636j43fc70a6m734d3ce18ad08f68@mail.gmail.com> (raw)
In-Reply-To: <W5766729606236531211258633@webmail35>
References: <W5766729606236531211258633@webmail35>
On Tue, May 20, 2008 at 12:43 AM, <clarkhorse@clarktx.com> wrote:
>>IIRC, you need to convert from network byte order:
>>
>>idno = ntohl(*((int32 *) PQgetvalue(result, row, 0)));
>>
> Thanks it led me in the right direction.
> I was getting confused with all of the pointers. I finally broke it down.
Oh yeah, I didn't spend enough time looking at whether you had defined
it as a pointer or not. My bad!
> Thanks again,
No problem.
--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jonah.harris@gmail.com, clarkhorse@clarktx.com
Subject: Re: Newbie problem with from database in C
In-Reply-To: <36e682920805200636j43fc70a6m734d3ce18ad08f68@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox