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

Re: alter table tablename add column - breaks pl/pgsql function returns tablename

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Palle Girgensohn <girgen(at)pingpong(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit kapila <amit(dot)kapila(at)huawei(dot)com>, Palle Girgensohn <girgen(at)freebsd(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: alter table tablename add column - breaks pl/pgsql function returns tablename
Date: 2012-11-05 21:23:43
Message-ID: 25105.1352150623@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Palle Girgensohn <girgen(at)pingpong(dot)net> writes:
> Please note that this problem does not go away by disconnecting and reconnecting, and other sessions get the error immediately, so the claim that it is bound to a session is false. 

Huh?  The test case you provided certainly doesn't exhibit any such
behavior.  I get

regression=# SELECT * FROM test_func();
ERROR:  wrong record type supplied in RETURN NEXT
CONTEXT:  PL/pgSQL function test_func() line 6 at RETURN NEXT
regression=# \c -
You are now connected to database "regression" as user "postgres".
regression=# SELECT * FROM test_func();
 id | foo 
----+-----
  1 |    
(1 row)

			regards, tom lane


In response to

Responses

pgsql-hackers by date

Next:From: Jeff JanesDate: 2012-11-05 21:23:58
Subject: Re: Pg_upgrade speed for many tables
Previous:From: Bruce MomjianDate: 2012-11-05 21:22:59
Subject: Re: Pg_upgrade speed for many tables

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