From: | Win Bausch <bausch(at)inf(dot)ethz(dot)ch> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | bausch(at)inf(dot)ethz(dot)ch |
Subject: | ecpg 2.8.0: at <connection name> problem |
Date: | 2001-08-07 09:47:38 |
Message-ID: | 3B6FB93A.45CF99BB@inf.ethz.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Dear Sirs,
ecpg 2.8.0 seems to wrongly translate the "at <connection name>"
clause.
System: SUN sparc ultra 5
SELECT version() says:
PostgreSQL 7.1.2 on sparc-sun-solaris2.6, compiled by GCC 2.95.2
The following statement works fine with ecpg version 2.7.1 (using
postgresql v7.1.2 libecpg , libpq libraries and v7.1.2 backend). When
using version 2.8.0 the error message produced at runtime at the server
is "COMMIT: no transaction in progress". As far as i can see, no queries
are issued to the backend. I noticed a small difference in the C code
both versions of ecpg generate (psConnectName appears tiwce in the code
generated by ecpg 2.8.0)
exec sql at :psConnectName declare fwdDep_c cursor for SELECT
templateId, depTemplateId FROM is_dependencies WHERE serverId =
:iServerId AND parentId = :iParentId AND instanceId = :iInstanceId AND
(depType = :iTypeIsCF OR depType = :iTypeIsCF_AND_DF) ORDER BY
depTemplateId ASC;
Here's the output produced by ecpg 2.7.1 for the example query :
ECPGdo(__LINE__, psConnectName, "declare fwdDep_c cursor for select
templateId , depTemplateId from is_dependencies where serverId = ?
and parentId = ? and instanceId = ? and ( depType = ? or depType = ?
) order by depTemplateId asc ",
ECPGt_int,&(iServerId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iParentId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iInstanceId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iTypeIsCF),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iTypeIsCF_AND_DF),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
Here's the one from ecpg 2.8.0:
{ ECPGdo(__LINE__, psConnectName, "declare fwdDep_c cursor for select
templateId , depTemplateId from is_dependencies where serverId = ?
and parentId = ? and instanceId = ? and ( depType = ? or depType = ?
) order by depTemplateId asc ",
ECPGt_char,&(psConnectName),0L,1L,1*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iServerId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iParentId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iInstanceId),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iTypeIsCF),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(iTypeIsCF_AND_DF),1L,1L,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,&(psConnectName),0L,1L,1*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
Regards,
Win Bausch
--
Win Bausch
Insitut fuer Informationssysteme
ETH Zentrum (CLU)
CH-8092 Zurich
Switzerland
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql-bugs | 2001-08-07 10:20:49 | ecpg: unstable INSERT operation |
Previous Message | zhabala | 2001-08-07 07:09:08 | =?iso-8859-2?B?T2Rwb3bs7zog?=Re: backend don't use index when querying by indexed column |