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

BUG #3116: attribute has wrong type

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3116: attribute has wrong type
Date: 2007-03-06 18:05:46
Message-ID: 200703061805.l26I5kFK066199@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3116
Logged by:          Greg Sabino Mullane
Email address:      greg(at)turnstep(dot)com
PostgreSQL version: 8.1.8
Operating system:   Linux
Description:        attribute has wrong type
Details: 

Reproduced on 8.2.3, 8.1.8, and CVS HEAD:

CREATE OR REPLACE FUNCTION gregtest(int) RETURNS varchar
LANGUAGE sql AS $$ SELECT 'abc'::text; $$;
                         
-- Works:
SELECT gregtest(123);

-- Does not:
SELECT boom FROM
( SELECT 123, gregtest(123) AS boom) AS tmp;

ERROR:  attribute 2 has wrong type
DETAIL:  TABLE has type text, but query expects character varying.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-03-06 18:21:46
Subject: Re: BUG #3116: attribute has wrong type
Previous:From: Heikki LinnakangasDate: 2007-03-06 18:02:51
Subject: Re: BUG #3115: backend died abnormally HELP!!

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