problems with dropped columns - Mailing list pgsql-general

From Damjan Pipan
Subject problems with dropped columns
Date
Msg-id 014801c2c6d2$40caf5b0$c400a8c0@valhala
Whole thread Raw
In response to list server problems?  (Martin Kutschker <Martin.Kutschker@blackbox.net>)
List pgsql-general
Hi!

I have following problem:
I have created a table with some fields, then I dropped last field (integer)
and added
one extra field (integer). Then I have created a function which returns
record of table
type. I have selected a record from table and returned it, but the values in
last
field are wrong (missing). It looks like that it takes the dropped field
instead of the last field.

Damjan

CREATE OR REPLACE FUNCTION damjan_test111(integer) RETURNS public.fk_test AS
'
DECLARE
rec fk_test%ROWTYPE;
siteid ALIAS FOR $1;
BEGIN
FOR rec IN SELECT * FROM public.fk_test WHERE
i = siteid LOOP
RETURN rec;
END LOOP;
END;
' LANGUAGE 'plpgsql';


pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: list server problems?
Next
From: Jason Hihn
Date:
Subject: Re: Using RSYNC for replication?