How to get text representation of composite value? - Mailing list pgsql-sql

From David Flegl
Subject How to get text representation of composite value?
Date
Msg-id 200704241412.8228@centrum.cz
Whole thread Raw
List pgsql-sql
Hello, I'd like to ask you for a help. I'm in trouble with $subj. I need something like documentation of PostgreSQL in
chapter8.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' and NEW.at2=100 I would get string: 'test',100
But the problem is then if trigger is generally used for many tables, Idon't know number of elements and so on.

As I know, for element types are defined output function, and I can use this:         SELECT
textin(point_out('(1,1)'::point))::varchar;

Anybody can help me? 
P.S. pl/pgsql would be best way if it possible.


David F



pgsql-sql by date:

Previous
From: Dmitry Turin
Date:
Subject: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
Next
From: Dmitry Turin
Date:
Subject: Re: We all are looped on Internet: request + transport = invariant