ecpg cursors and scope

Поиск
Список
Период
Сортировка
Искать
От
Dave Broudy
Тема
ecpg cursors and scope
Дата
Msg-id
Pine.LNX.3.96.990420211941.26465C-100000@guild.net
Список
Дерево обсуждения
ecpg cursors and scope Dave Broudy <shaggy@broudy.net>
Re: [INTERFACES] ecpg cursors and scope Michael Meskes <meskes@postgresql.org>
I have two senarios about scoping and ecpg's parsing of cursor
declarations:

A) In seperate functions:

func1() {
  exec sql declare test_cur for ...
}
func2() {
  exec sql declare test_cur for ... /* same or different sql */
}

B) In an if:

if(...) {
  exec sql declare test_cur for ...
} else {
  exec sql declare test_cur for ... /* same or different sql */
}

These both yield "cursor test_cur already defined"

Is this by design? I seem to remember it working under 6.3.2, and this is
under 6.4.2

If I knew lex/yacc, I'd make an effort at a patch, alas my compilers class
of a few years ago made us parse the old fashioned way :) Does anyone know
of a work-around?

Thanks,

Dave Broudy             dave@broudy.net


В списке pgsql-interfaces по дате отправления
От: David Smith
Дата:
Сообщение: Macintosh ODBC port?
От: Pavel PaJaSoft Janousek
Дата:
Сообщение: Error in ECPG and #if...
FAQ