Re: How do I pack a class into a string? Is serialize available?

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Gurunandan R(dot) Bhat" <grbhat(at)exocore(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I pack a class into a string? Is serialize available?
Date: 2001-08-29 13:25:34
Message-ID: m37kvn5775.fsf@belphigor.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gurunandan R. Bhat" <grbhat(at)exocore(dot)com> writes:

> On 28 Aug 2001, Doug McNaught wrote:
>
> > What problem are you trying to solve?
>
> I wanted to write a small utility to keep two databases synchronised.
> Whenever I add a row to a table in the local database, I intend to put a
> trigger that would update a special table with the modified tablename and
> the serialised version of the new row. I then copy this single table
> across and rebuild my remote database.
>
> And advice?

Well, you could certainly write a set of per-table serialization
functions, and attach each one to its table via a trigger. It might
actually be possible to write a generel serialization function in C if
not in one of the other languages.

What you need to do is come up with a serialization format, perhaps
stealing one (from PHP?). ;) Serialization is basically a matter of
escaping and delimiting data; how you do it depends on what kind of
data you have and how it's put together.

Does this help?

-Doug
--
Free Dmitry Sklyarov!
http://www.freesklyarov.org/

We will return to our regularly scheduled signature shortly.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2001-08-29 13:28:39 Re: RFC: PostgreSQL and MySQL comparison.
Previous Message A. Snelders 2001-08-29 13:20:18 Locate on Max() and Group By