Re: troubles with getting data from tables

From: Roman Bogorodskiy <bogorodskiy(at)inbox(dot)ru>
To: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: troubles with getting data from tables
Date: 2003-09-24 03:18:41
Message-ID: 20030924071841.6e33c20d.bogorodskiy@inbox.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

-----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-----

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Meskes 2003-09-24 07:25:42 Re: ECPG insert into table name as a variable
Previous Message Igor Shevchenko 2003-09-23 23:19:46 Re: libpq: how to get a sequence of partial PGresult-s