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

Re: retreive record set

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Michael GUIARD" <m(dot)guiard(at)nestor-tech(dot)com>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: retreive record set
Date: 2005-08-06 17:29:11
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE094660@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
> Hi Magnus,
> 
> I understood that I am not supposed to know how PGresult 
> stores the data, but I do not know how to fill my structure 
> directly rather than to fill it field by field.
> I saw ecpg gives methods to do this (with descriptors), but I 
> do not understand all about it, and I think it is too 
> complicated for my small needs. Further, I do not want to 
> change the implementation of postgreqsl libpq.
> 
> So if I have no other choice than convert all result fields 
> to fill my structure I will do this ...
> 
> what is your advices about this ?

AFAIK there is no way in libpq to bind directly to variables. You'll
have to do a loop with pqgetvalue() to fill your struct.

//Magnus

pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2005-08-06 17:30:19
Subject: Re: Can't connect after restart
Previous:From: Magnus HaganderDate: 2005-08-04 08:05:33
Subject: Re: Problem installing Postgresql 8 on Win 2000

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