| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Dalton Shane <se401029(at)cs(dot)may(dot)ie> |
| Cc: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: problem with RECORD in a stored procedure |
| Date: | 2002-03-08 16:16:10 |
| Message-ID: | 20020308081530.E834-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, 8 Mar 2002, Dalton Shane wrote:
>
> HI,
>
> I have a strange problem with regard to the RECORD type. IN plpgsql language it
> doesn't seem to recognise the data type. Does anybody have any idea why? I've
> included a sample function and the terminal output to show what I mean. I've
> also included what should have gone into table orla.
>
> Any help would be appreciated in sorting out this frustrating problem.
>
> Shane
>
> CREATE FUNCTION sinead() RETURNS integer AS '
> DECLARE
> a integer :=0;
> b RECORD;
>
>
> BEGIN
> FOR b IN SELECT MIN(total) from results LOOP
> INSERT INTO orla(total) VALUES(b);
You need to specify an attribute of b to insert here (for example
b.min).
> END LOOP;
>
> RETURN a;
>
>
> END;
> ' LANGUAGE 'plpgsql';
| From | Date | Subject | |
|---|---|---|---|
| Next Message | daq | 2002-03-08 17:53:15 | Re: problem with RECORD in a stored procedure |
| Previous Message | Dalton Shane | 2002-03-08 15:06:16 | problem with RECORD in a stored procedure |