ECPG Deallocate PREPARE statement - bug ?

Поиск
Список
Период
Сортировка
От leif@crysberg.dk
Тема ECPG Deallocate PREPARE statement - bug ?
Дата
Msg-id 27965575.198751248349947629.JavaMail.root@quick
обсуждение исходный текст
Ответы Re: ECPG Deallocate PREPARE statement - bug ?
Список pgsql-general
Hi guys,

   I have a program that I need compile using PostgreSQL 8.4.0 (or later) and it must be able to run on an 8.3.5 based
systemas well as 8.4.0. I'm using embedded SQL for C and I have the following sequence of statements: 

   snprintf( stmt, 3000, "SELECT count(*) FROM %s WHERE %s", *table, *where );
   EXEC SQL AT :_thisDbConn PREPARE cntstmt FROM :stmt;
   EXEC SQL AT :_thisDbConn EXECUTE cntstmt INTO :recCount :fnull;
   .
   .
   EXEC SQL DEALLOCATE PREPARE cntstmt;

   This seems to be ok running on the 8.4.0 system, but when running it on the 8.3.5, it complains that it is an
'Invalidstatement name cntstmt' for the deallocation. 

   I then tried to add the 'AT :_thisDbConn' to the DEALLOCATE statement, but ecpg complained that there was no "at"
allowedfor deallocate. However, looking at the output (the .c file) I noticed that it had generated an apparently
correctECPG_deallocate() call. Manually compiling this and linking the program turned out to be able to run on both the
8.3.5and the 8.4.0 system without problems. 

   Is this a bug in ecpg or am I doing something  wrong ?

  Please advise,

 Leif

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: comparing NEW and OLD (any good this way?)
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: comparing NEW and OLD (any good this way?)