From: Roman Bogorodskiy <bogorodskiy@inbox.ru>
To: Jeroen T. Vermeulen <jtv@xs4all.nl>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: troubles with getting data from tables
Date: Wed, 24 Sep 2003 07:18:41 +0400
Message-ID: <20030924071841.6e33c20d.bogorodskiy@inbox.ru> (raw)
In-Reply-To: <20030923164504.GA70502@xs4all.nl>
References: <20030923201750.7cacf851.bogorodskiy@inbox.ru>
<20030923164504.GA70502@xs4all.nl>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeroen wrote:
> First off, a question: why don't you just select the field you want,
> so you know its index in the result set? That'll probably transport
> less data, save you that PQfnumber() call, and make your code shorter
> and more readable.
I'm new to libpq programming, so...
> The pointer you're getting is a pointer-to-char, i.e. a string.
> Unless you explicitly enabled the "binary tuples" option, what you're
> getting is exactly that: a string. But instead of parsing the string,
> you're casting its base pointer to pointer-to-int!
Thank you fo answer, it realy helped me.
- -Roman Bogorodskiy [Novel]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iQEVAwUBP3ENESpMDQ8aPhy0AQKvNQf/RcCNMoCDQiTeCBecZ5XcI1IS3QVfReiN
UuvPD54081AZNtLq2H+Ux7XRHeacwaSDna2l5oXLZCrVsmbrD8XdzbZoK/CB0Ry0
j8ansMkFJmhaB2FGiK/7UG7Ov82qGi6Q3vMxVWZajmSd00qafs442/RT4+KJsVvy
r4PHvHoTDRHmh/PAMFfXABHJE5eub9D9NmL6ETp0HDCHMvVa26nUpProPkZF6Wz9
GyKcVOEU7xgKyoFsr6Zr/o6qXfNYtAjttewzrMXjTkwtN51EJnOA0gHXjlrKt3TU
yiiM+J2euk6V/90qCvGvZc4trw49Sno2rpWI4JfReu3AECaEWIAe2g==
=7SKo
-----END PGP SIGNATURE-----
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: bogorodskiy@inbox.ru, jtv@xs4all.nl
Subject: Re: troubles with getting data from tables
In-Reply-To: <20030924071841.6e33c20d.bogorodskiy@inbox.ru>
* 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