Re: [GENERAL] Using composite types within PLPGSQL Function

2013-01-08 Thread Leif Biberg Kristensen
Tirsdag 8. januar 2013 16.10.03 skrev Graeme Hinchliffe : > My example code is : > > CREATE TYPE testtype AS ( > a INTEGER, > b INTEGER > ); > > CREATE OR REPLACE FUNCTION test() RETURNS INTEGER AS $$ > DECLARE > x testtype; > BEGIN > (x).a:=1; > RETURN 1; > END > $$ LANGUAGE plpgsql; > > Thi

[GENERAL] Using composite types within PLPGSQL Function

2013-01-08 Thread Graeme Hinchliffe
Hi, I am trying to use a composite type within a function, I have tried SELECT INTO and direct assignment to set the value of a single element within the composite variable with no joy. I hope this is simply a case of my not knowing the correct syntax? My example code is : CRE