Re: Simple row serialization?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Voras <ivoras(at)freebsd(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simple row serialization?
Date: 2008-01-26 18:40:24
Message-ID: 8905.1201372824@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ivan Voras <ivoras(at)freebsd(dot)org> writes:
> Andrew Dunstan wrote:
>> Or you could possibly use some of the XML support in 8.3 for serialization.

> I need this for 8.1 :)

There's an even easier way in 8.3: just cast the rowtype to text.

regression=# select row(1,2,false)::text;
row
---------
(1,2,f)
(1 row)

Although this won't work at the SQL level in 8.1, I think you might be
able to accomplish the equivalent within plpgsql by assigning the
rowtype value to a text variable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2008-01-26 18:45:55 Re: Simple row serialization?
Previous Message Ivan Voras 2008-01-26 18:32:35 Re: Simple row serialization?