Skip site navigation (1) Skip section navigation (2)

Re: Newbie problem with from database in C

From: clarkhorse(at)clarktx(dot)com
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, clarkhorse(at)clarktx(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Newbie problem with from database in C
Date: 2008-05-19 06:47:57
Message-ID: W7951027752238411211179677@webmail39 (view raw or flat)
Thread:
Lists: pgsql-interfaces
-----Original Message-----
From: Jonah H. Harris [mailto:jonah(dot)harris(at)gmail(dot)com]
Sent: Sunday, May 18, 2008 09:52 PM
To: clarkhorse(at)clarktx(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Newbie problem with from database in C

On Sun, May 18, 2008 at 9:13 PM,  wrote:> characters are fine so far. I have placed the code I am using below.> Would appreciate it if someone could tell me what is wrong or provide me> with a reference on how to do this properly.
 IIRC, you need to convert from network byte order:
idno = ntohl(*((int32 *) PQgetvalue(result, row, 0)));

after adding this code line I get
client3z.c:140: warning: assignment makes pointer from integer without a cast

I also added 
#include <endian.h>

pgsql-interfaces by date

Next:From: clarkhorseDate: 2008-05-20 04:43:53
Subject: Re: Newbie problem with from database in C
Previous:From: Dennis WangDate: 2008-05-19 05:53:58
Subject: Re: pg_subtrans directory grows over 1 GB, is there a way to control it?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group