Re: ecpg bug with SQL TYPE xxxPtr is xxx REFERENCE? - Mailing list pgsql-interfaces

From Lee Kindness
Subject Re: ecpg bug with SQL TYPE xxxPtr is xxx REFERENCE?
Date
Msg-id 15218.17632.620575.929276@elsick.csl.co.uk
Whole thread Raw
In response to Re: ecpg bug with SQL TYPE xxxPtr is xxx REFERENCE?  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
Michael Meskes writes:> On Wed, Aug 08, 2001 at 09:07:18AM -0700, Lee Kindness wrote:> > I believe ecpg is incorrectly
handlingthe placement of results into a> > pointer to a host structure, consider the following function:> >
GeoContractorTabPtrptr;> 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.


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: Maybe off-topic: Why MySQL so popular? (or why PostgreSQL so un-popular?)
Next
From: Lee Kindness
Date:
Subject: Argh (was about an ECPG bug)