Re: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)
Дата
Msg-id 24145.1101353795@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)  (Sean Chittenden <sean@chittenden.org>)
Ответы Re: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)  (Sean Chittenden <sean@chittenden.org>)
Список pgsql-bugs
Sean Chittenden <sean@chittenden.org> writes:
> Which, doesn't work as expected as it seems as though there's something
> left behind on the stack that shouldn't be.  Here's the case to
> reproduce (doesn't involve pgmemcache):

> test=# CREATE FUNCTION t5_func() RETURNS TRIGGER AS 'BEGIN EXECUTE
> TRUE; RETURN NULL; END;' LANGUAGE 'plpgsql';

What are you expecting "execute true" to do?  The argument of EXECUTE
is a string, not a boolean, and it's supposed to be a string that looks
like a SQL command.  The result

> ERROR:  syntax error at or near "t" at character 1
> QUERY:  t
> CONTEXT:  PL/pgSQL function "t5_func" line 1 at execute statement
> LINE 1: t
>          ^

is pretty much what I'd expect considering that plpgsql will do whatever
it takes to coerce the expression result to text.

            regards, tom lane

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

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...)
Следующее
От: Kent Tong
Дата:
Сообщение: Re: equal operator fails on two identical strings if initdb