[SQL] How to get text representation of composite value?

2007-04-24 Thread David Flegl
Hello, I'd like to ask you for a help. I'm in trouble with $subj. I need something like documentation of PostgreSQL in chapter 8.11.5 says. Inside trigger I have record type NEW which is composite type. How could one do something like : text_var:=to_char(NEW) So if NEW.at1='test'

Re: [SQL] hi

2007-04-24 Thread David Flegl
Hi, try this. It's working... SELECT t1.sno, sum(t2.value) FROM temp as t1, temp as t2 WHERE t1.sno >= t2.sno GROUP BY t1.sno; but not completely. The problem is the this suppose your sno is uniqu. But as I see 3 is not. Anyway it may help you. >I have the data like this in temp table > >SQL>

[SQL] NEW to plpythonu function?

2007-04-30 Thread David Flegl
etting system messages like: plpythonu don't know argument type recort, anyelement) P.S. I would like to have trigger function in plpgsql and supporting function in plpythonu, not to join them to plpythonu. Thankx a lot David Flegl ---(end of broadcast)---