Re: Bug #668: cursors with params: mismatched parentheses;

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bug #668: cursors with params: mismatched parentheses;
Дата
Msg-id 200206070539.g575dIk21431@candle.pha.pa.us
обсуждение исходный текст
Ответ на Bug #668: cursors with params: mismatched parentheses;  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
I don't know what syntax uses parens for stored procedure cursors, but
we don't support it.  Place the '1' in the cursor WHERE clause.  You
can't pass it into the cursor using parens.

---------------------------------------------------------------------------

pgsql-bugs@postgresql.org wrote:
> Eduardo Rambo (rambo@portoweb.com.br) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> cursors with params: mismatched parentheses;
>
> Long Description
>   cursors with parameters do not seems to work. Is that implemented?
>
>  I tried many differents ways and get the same result:
>
> mismatched parentheses,
>
> no matter what table or data type the cursor is based on.
>
> I have a linux conectiva 5 (derrived of Red Hat 7.0), and
> Postgres 7.2.1.
>
>
>
> Sample Code
> create table tab_teste (codigo int primary key ,campo varchar(100));
>
> CREATE or replace FUNCTION fteste(int)
>     RETURNS numeric
>     AS '
> DECLARE
> curs3 CURSOR (key int) IS SELECT * from tab_teste where codigo = key;
> reg tab_teste%ROWTYPE;
> BEGIN
>
> OPEN curs3(1);
> FETCH curs3 INTO reg;
> CLOSE curs3;
> RETURN 0;
> END;'
>     LANGUAGE 'plpgsql';
>
> select fteste(11);
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Ingo van Lil
Дата:
Сообщение: Postgres Reference Manual
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #685: pg_dump don't works with many tables