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>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: retreive record set
Date: 2005-08-01 08:03:05
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C77E7@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
> Hi !
>  
> I'd like to get my request results in a record set as a C 
> structure using libpq.
> Is it possible or do I have to use ECPG only ?
>  
> How PGresult pointer stores the results ? 
> Actually I can convert all my result fields from PGresult to 
> my C structure but I think also it is a little bit stupid if 
> PGresult does its own conversion before ... no ?

You are not suppsed to know how PGresult stores the data, you are only
permitted to access it through the accessor functions. This is so it's
possible to change the underlying implementation without breaking your
apps...

You *can* access the data directly, all the rqeuired structs are in the
include files (but not in the libpq-fe.h file - you need the full
includes). I would stronly advise you not to, though.

//Magnus

Responses

pgsql-hackers-win32 by date

Next:From: Michael GUIARDDate: 2005-08-01 08:41:44
Subject: Re: retreive record set
Previous:From: Michael GUIARDDate: 2005-08-01 07:38:25
Subject: retreive record set

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