From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: ecpg bug with SQL TYPE xxxPtr is xxx REFERENCE? |
Date: | 2001-08-09 08:08:00 |
Message-ID: | 15218.17632.620575.929276@elsick.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Michael Meskes writes:
> On Wed, Aug 08, 2001 at 09:07:18AM -0700, Lee Kindness wrote:
> > I believe ecpg is incorrectly handling the placement of results into a
> > pointer to a host structure, consider the following function:
> > GeoContractorTabPtr ptr;
> This is not a pointer. This defines ptr to be a struct, doesn't it?
It's a pointer but it's conforming to some god-awful programming
practise we have in house. For example in table_strs.h there is:
/* Description of table geo_contractor from database */
typedef struct GeoContractorTabStr_
{
char project_id[9];
char contractor[53];
} GeoContractorTabStr, *GeoContractorTabPtr;
and in table_strs_embedded.h
/* Description of table geo_contractor from database */
EXEC SQL TYPE GeoContractorTabStr IS STRUCT {
char project_id[9];
char contractor[53];
};
EXEC SQL TYPE GeoContractorTabPtr IS GeoContractorTabStr REFERENCE;
both are included in the C file.
Thanks, Lee Kindness.
From | Date | Subject | |
---|---|---|---|
Next Message | Lee Kindness | 2001-08-09 08:13:35 | Argh (was about an ECPG bug) |
Previous Message | Tom Lane | 2001-08-08 21:56:16 | Re: Maybe off-topic: Why MySQL so popular? (or why PostgreSQL so un-popular?) |