Re: [SQL] Assigning Values to Composite Types

2009-10-22 Thread Tom Lane
Gary Chambers writes: > /* Here is where I am stuck trying to fill data >I've tried: >data.term_count.coord_type := S; >(data.term_count).coord_type := S; >data.(term_count.coord_type) := S; > */ I'm afraid plpgsql isn't tremendousl

[SQL] Assigning Values to Composite Types

2009-10-22 Thread Gary Chambers
All... Given the following [hopefully] relevant portions of a function: CREATE OR REPLACE FUNCTION solve(FLOAT8, VARCHAR, CHAR) RETURNS SETOF sometype_t AS $solve$ DECLARE data sometype_t; ... BEGIN FOR term_count IN SELECT DISTINCT coord_type AS coord_type, MAX(term) AS maxterms