From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | FW: [GENERAL] problems with dropped columns |
Date: | 2003-01-29 07:52:27 |
Message-ID: | GNELIHDDFBOCMGBFGEFOGEECCFAA.chriskl@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This came to -general, it seems like a serious problem...
Chris
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Damjan Pipan
> Sent: Tuesday, 28 January 2003 9:36 PM
> To: pgsql-general(at)postgresql(dot)org
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-01-29 07:53:23 | Re: Specifying Rowtypes |
Previous Message | Tom Lane | 2003-01-29 07:37:31 | Re: Strange Prepare bug |