Simple row serialization?

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Simple row serialization?
Дата
Msg-id fnfup3$9ba$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: Simple row serialization?  ("Adam Rich" <adam.r@sbcglobal.net>)
Список pgsql-general
Hi,

I'd like to implement some simple data logging via triggers on a small
number of infrequently updated tables and I'm wondering if there are
some helpful functions, plugins or idioms that would serialize a row
(received for example in a AFTER INSERT trigger) into a string that I'd
store in the log table. There's a limited number of field types
involved: varchars, integers and booleans. I'm not looking for anything
fancy, comma-separated string result would be just fine; even better,
something like a dictionary ("field_name":"field_value",...) would be
nice. The reason for trying to do it this way is that want to have a
single log table to log many tables (again, they are infrequently
updated). I need this for PostgreSQL 8.1.

I got suggestions to try composite types but I don't think they could be
useful for this. What I need is possibly a generic "row" type ("any" and
"record" generate syntax error in CREATE TABLE) - any ideas on where to
start looking?




Вложения

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

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: can't create index with 'dowcast' row
Следующее
От: "Adam Rich"
Дата:
Сообщение: Re: Simple row serialization?