Error in PLpgSQL with SELECT INTO and composite types
От
Heikki Linnakangas
Тема
Error in PLpgSQL with SELECT INTO and composite types
Дата
Msg-id
49BAC5C6.3040802@enterprisedb.com
Список
Дерево обсуждения
Error in PLpgSQL with SELECT INTO and composite types Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Error in PLpgSQL with SELECT INTO and composite types Tom Lane <tgl@sss.pgh.pa.us>
Tested on 8.2, 8.3 and CVS HEAD:
CREATE TYPE atype AS (a int);
CREATE TYPE btype AS (compcol atype);
CREATE FUNCTION foofunc() RETURNS void AS $$
declare
avar atype;
bvar btype;
begin
SELECT '("(1)")'::btype INTO bvar; -- Should work, but errors
end;
$$ LANGUAGE plpgsql;
SELECT foofunc();
Gives error:
ERROR: invalid input syntax for integer: "(1)"
CONTEXT: PL/pgSQL function "foofunc" line 6 at SQL statement
Surely assigning a value of btype to a variable of the same type should
always work..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.comВ списке pgsql-bugs по дате отправления
От: Heikki Linnakangas
Дата: