Re: [GENERAL] problems with dropped columns
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
To: "Damjan Pipan" <damjan.pipan@siol.net>, <pgsql-general@postgresql.org>, "Hackers" <pgsql-hackers@postgresql.org>
Date: 2003-03-06T02:21:36Z
Lists: pgsql-hackers
I want to fix this bug, however I can't see how the example below is failing... (Obeys dropped columns) I'm not up with my SRFs, so would someone be able to post a concise SQL script that demonstrates the failure? I can see in the code that it should be failing, but I need a demonstrated example... Chris ----- Original Message ----- From: "Damjan Pipan" <damjan.pipan@siol.net> To: <pgsql-general@postgresql.org> Sent: Tuesday, January 28, 2003 9:36 PM Subject: [GENERAL] problems with dropped columns > 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'; > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org >