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

Re: ECPG failed and Postmaster getting bigger in using perl Pg

From: SAKAIDA Masaaki <sakaida(at)psn(dot)co(dot)jp>
To: "S(dot)F(dot) Lee" <sflee_tw(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG failed and Postmaster getting bigger in using perl Pg
Date: 2000-05-10 06:13:56
Message-ID: 3918FE241C2.6546SAKAIDA@smtp.psn.ne.jp (view raw or flat)
Thread:
Lists: pgsql-interfaces
"S.F. Lee" <sflee_tw(at)yahoo(dot)com> wrote:

> After executing program(Test), I got different result
> in each version of PostgreSQL, 
> such as:
> 
>    In PostgreSQL 6.5.3 + ecpg 2.7 : a1 = 10 b1 =
> 11.100000   
> 
>    In PostgreSQL 7.0RC5 + ecpg 2.7 : sql_select--foo_1
> : Too few arguments in line 33.

  This is a bug of pre-processor in PostgreSQL-7.0RC5.

  The solutions of the bug:

 1. Don't use a struct host variable.

  old)  exec sql select * into :temp  ...
  new)  exec sql select a1,b1 into :temp.a1, :temp.b1  ...

 2. Apply the next patch.

*** postgresql-7.0RC5/src/interfaces/ecpg/preproc/type.c.orig	Wed May 10 14:45:55 2000
--- postgresql-7.0RC5/src/interfaces/ecpg/preproc/type.c	Wed May 10 14:46:43 2000
***************
*** 198,203 ****
--- 198,209 ----
  void
  ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * typ, const char *ind_name, struct ECPGtype * ind_typ, const char *prefix, const char *ind_prefix)
  {
+ 	if (ind_typ == NULL)
+ 	{
+ 		ind_typ = &ecpg_no_indicator;
+ 		ind_name = "no_indicator";
+ 	}
+ 
  	switch (typ->typ)
  	{
  			case ECPGt_array:





--
Regards,
SAKAIDA Masaaki  -- Osaka, Japan



In response to

Responses

pgsql-interfaces by date

Next:From: Michael MeskesDate: 2000-05-10 07:42:22
Subject: Re: ECPG failed and Postmaster getting bigger in using perl Pg
Previous:From: Thomas LockhartDate: 2000-05-10 05:33:21
Subject: Re: looking for doc for ecpg

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