records to text representation

From: "Peter Filipov" <pfilipov(at)netissat(dot)bg>
To: pgsql-general(at)postgresql(dot)org
Subject: records to text representation
Date: 2005-11-04 11:49:19
Message-ID: opszpsgh2oligf9v@draco
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there any way to covert an instance of a composite type to text,
to store it in a text column, and then to recreate the original object?
For example:

create type test as (a integer, b text);
create tble tstore (s text);

insert into tstore values((someproc((row(1, 'tst'))::test))::text);
select (someproc(s))::test from tstore;

BTW, I succeeded to create an array of composite types althought I think
i met somewhere in the docs that these are still not supported.
I did it by fiddling with the system catalogs.

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2005-11-04 14:06:58 Re: Changing ids conflicting with serial values?
Previous Message Lolke B. Dijkstra 2005-11-04 10:51:35 BLOB and OID