From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | PGBugs List <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Stack not being popped correctly (was: Re: [HACKERS] plpgsql lacks generic identifier for record in triggers...) |
Date: | 2004-11-25 03:36:35 |
Message-ID: | 24145.1101353795@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Sean Chittenden <sean(at)chittenden(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kent Tong | 2004-11-25 03:44:32 | Re: equal operator fails on two identical strings if initdb |
Previous Message | Tom Lane | 2004-11-25 03:24:26 | Re: plpgsql lacks generic identifier for record in triggers... |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-11-25 03:47:56 | Re: Postresql 8.0 Beta 3 - SELECT ... FOR UPDATE |
Previous Message | Rod Taylor | 2004-11-25 03:33:45 | Re: Postresql 8.0 Beta 3 - SELECT ... FOR UPDATE |