Re: Simple row serialization?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Simple row serialization?
Дата
Msg-id 479CC1AC.4090101@dunslane.net
обсуждение исходный текст
Ответ на Re: Simple row serialization?  ("Ivan Voras" <ivoras@freebsd.org>)
Список pgsql-hackers

Ivan Voras wrote:
> On 27/01/2008, tomas@tuxteam.de <tomas@tuxteam.de> wrote:
>
>   
>> On Sat, Jan 26, 2008 at 07:32:35PM +0100, Ivan Voras wrote:
>>     
>>> Andrew Dunstan wrote:
>>>       
>> [...]
>>     
>>>> Or you could use an hstore (see contrib).
>>>>         
>>> Doesn't seem applicable.
>>>       
>> Have a closer look: it might :-)
>>     
>
> I found these documents on hstore:
>
> http://developer.postgresql.org/pgdocs/postgres/hstore.html
> http://www.sai.msu.su/~megera/wiki/Hstore
>
> >From them, it seems "hstore" is another datatype (as in:
> 'a=>b'::hstore), which sounds good (though if it was me I'd have
> picked a different name for it, like "dict" or "hashmap" :) ) for
> storing both field names and their values, but I don't see a way to
> convert a row/record passed to a trigger to a hstore.
>
>
>   


It's trivial to do in a plperl trigger, since it gets the new and old 
records as hashes with the field names as keys.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: CLUSTER and synchronized scans and pg_dump et al
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CLUSTER and synchronized scans and pg_dump et al