Vincenzo Romano <vincenzo.romano@xxxxxxxxxxx> writes: > Under PGSQL v8.2.4, in a PL/PgSQL function whenver I try to run this > statement: > INSERT INTO table1 SELECT var1.*; > I get his message: > ERROR: record type has not been registered Works for me: $ psql ... Welcome to psql 8.2.4, the PostgreSQL interactive terminal. ... regression=# create table table1(f1 int, f2 text); CREATE TABLE regression=# create or replace function foo() returns void as $$ declare var1 table1; begin select * into var1 from table1; insert into table1 select var1.*; end$$ language plpgsql; CREATE FUNCTION regression=# insert into table1 values(1,'one'); INSERT 0 1 regression=# select foo(); foo ----- (1 row) regression=# select * from table1; f1 | f2 ----+----- 1 | one 1 | one (2 rows) If that's not what you did, then let's see exactly what you did do. regards, tom lane