Skip site navigation (1) Skip section navigation (2)

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

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-11-25 03:47:56
Subject: Re: Postresql 8.0 Beta 3 - SELECT ... FOR UPDATE
Previous:From: Rod TaylorDate: 2004-11-25 03:33:45
Subject: Re: Postresql 8.0 Beta 3 - SELECT ... FOR UPDATE

pgsql-bugs by date

Next:From: Kent TongDate: 2004-11-25 03:44:32
Subject: Re: equal operator fails on two identical strings if initdb
Previous:From: Tom LaneDate: 2004-11-25 03:24:26
Subject: Re: plpgsql lacks generic identifier for record in triggers...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group