Re: ECPG - bug in EXEC SQL WHENEVER NOT FOUND?

From: Christian Rank <christian(dot)rank(at)rz(dot)uni-passau(dot)de>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ECPG - bug in EXEC SQL WHENEVER NOT FOUND?
Date: 2004-03-08 06:59:03
Message-ID: 404C19B7.1000203@rz.uni-passau.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Meskes wrote:
> On Sat, Mar 06, 2004 at 09:54:13PM +0100, Christian Rank wrote:
>
>>Today I ran into problems when combining a C program with SQL statements
>>with the ECPG interface of PostgreSQL:
>>
>>According to the documentation, it should be possible with
>> EXEC SQL WHENEVER NOT FOUND action
>>to trigger an action when a query does not return a row.
>
>
> Yes, that should work.
>
>
>>Is this a bug in ECPG or am I doing something wrong?
>
>
> Which version are you using? I get this:
>
> postgres(at)feivel:/home/postgres/pgsql/src/interfaces/ecpg$ ./a
> [21964]: ECPGdebug: set to 1
> [21964]: ECPGconnect: opening database mm on <DEFAULT> port <DEFAULT>
> [21964]: ECPGexecute line 16: QUERY: select n from t on connection mm
> [21964]: ECPGexecute line 16: Correctly got 0 tuples with 1 fields
> [21964]: raising sqlcode 100 in line 16, 'No data found in line 16.'.
> no data found
> [21964]: ecpg_finish: Connection mm closed.
>
> Looks okay, doesn't it?

Sorry that I didn't mention: I have PostgreSQL 7.4.1 on Slackware 9.1.

Today I tried with a 7.5devel snapshot of 16.02.2004. In this version,
everything works as it should, so I assume that this bug is fixed in the
meantime.

Thank you very much for your help,
Christian

--
Dr. Christian Rank
Rechenzentrum Universität Passau
Innstr. 33
D-94032 Passau
GERMANY
Tel.: 0851/509-1838
Fax: 0851/509-1802
PGP public key see http://www.rz.uni-passau.de/mitarbeiter/rank

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karam Chand 2004-03-08 08:40:45 Cant use Win32 API()
Previous Message Mage 2004-03-07 19:35:56 Re: recursive trigger