Serialized data type for the Serialize code - Mailing list pgsql-jdbc

From Ken K
Subject Serialized data type for the Serialize code
Date
Msg-id 20010526135830.12502.cpmta@c007.snv.cp.net
Whole thread Raw
List pgsql-jdbc
Hi all,

  Before I start working on this code I would like to
get any feed back from others who have worked with the
Serialize package or have created custom data types
in Postgres.

Two problems with the current Serialize code are that
you need to know the type of class stored before you
can read it back and if the record with the oid field
is deleted the serialized record the oid points to is
not deleted.

What I would like to do is create a new user defined
data type for Postgres called serialized that would
contain two oid', one pointing to the table for the
serialized object and one pointing to the record in
that table.

I have never worked with user defined types in
Postgres or with the JDBC. I suppose that in Java
the serialized type would be implimented as a array
of two integers.

It does not seem that there is any way to fire
rules or triggers on data types, so the user would
still need to add triggers on tables that contain
serialized fields to handle deletes and updates.
Two generic functions could be created, though, that
would handle all classes.

Any comments on this idea?

Thanks,

Ken



pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PreparedStatment.setBinaryStream()
Next
From: "Dave Cramer"
Date:
Subject: Re: Serialized data type for the Serialize code