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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2000-05-10 07:42:22 | Re: ECPG failed and Postmaster getting bigger in using perl Pg |
Previous Message | Thomas Lockhart | 2000-05-10 05:33:21 | Re: looking for doc for ecpg |