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

Re: ecpg bug with SQL TYPE xxxPtr is xxx REFERENCE?

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: (view raw, whole thread or download thread mbox)
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.

In response to

pgsql-interfaces by date

Next:From: Lee KindnessDate: 2001-08-09 08:13:35
Subject: Argh (was about an ECPG bug)
Previous:From: Tom LaneDate: 2001-08-08 21:56:16
Subject: Re: Maybe off-topic: Why MySQL so popular? (or why PostgreSQL so un-popular?)

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