Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 785872E0037 for ; Tue, 20 May 2008 10:41:08 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80957-06 for ; Tue, 20 May 2008 10:40:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by developer.postgresql.org (Postfix) with ESMTP id 463A22E00D0 for ; Tue, 20 May 2008 10:36:07 -0300 (ADT) Received: by ti-out-0910.google.com with SMTP id y8so1378412tia.5 for ; Tue, 20 May 2008 06:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=l3LmLoB+T8KZRAMN+CplxMV4AWh90CWEuh0YBfDjtYI=; b=nBora5k12BrmIlTe10Z/YrRuxrktfb+/AaCpDkSbHcOQ8YInrNRur9Vq/pTgogC23WzYfmVu5OIoApZcGWKIm3096Ges19AFBy3zyvqD7Xwbkt9SWPUPw18UlbUEE4OKi5HWvbYo2ZYR5Zt6TbBaParkJSwrFu4EGVtWtuQeQSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=vYXASNrGQjpd7w9ggQF96Wfw9J9xALF/qwP6RGObTDT1U6wHb+5ryS07lwdAmQOHwIGnQvTYFfrl5L81A8J+s1UW4J18EOKhLlH6pFbPlNF3Qy9V5ID5jtrxWgCyTfxvbB5gjs9UGXoW26rEXB4yjDOZoX53XaOb6pvyRUuJc7w= Received: by 10.150.50.3 with SMTP id x3mr7539919ybx.3.1211290563141; Tue, 20 May 2008 06:36:03 -0700 (PDT) Received: by 10.150.57.2 with HTTP; Tue, 20 May 2008 06:36:03 -0700 (PDT) Message-ID: <36e682920805200636j43fc70a6m734d3ce18ad08f68@mail.gmail.com> Date: Tue, 20 May 2008 09:36:03 -0400 From: "Jonah H. Harris" To: clarkhorse@clarktx.com Subject: Re: Newbie problem with from database in C Cc: pgsql-interfaces@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/19 X-Sequence-Number: 6743 On Tue, May 20, 2008 at 12:43 AM, 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/