Search Postgresql Archives

records to text representation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux