Re: newbie question - Mailing list pgsql-general

From Doug McNaught
Subject Re: newbie question
Date
Msg-id m3vgpxxtj2.fsf@belphigor.mcnaught.org
Whole thread Raw
In response to newbie question  (prashanth bhat <prashanth_bhat@yahoo.com>)
List pgsql-general
prashanth bhat <prashanth_bhat@yahoo.com> writes:

> hi all,
>
> Is it possible to store java Objects in postgres and
> invoke methods on them??. Is it possible to store XML
> in postgres?.

The answer to both your questions is "yes, but..."

Any Java object that implements Serializable can be serialized into a
byte stream, which can them be stored as a BLOB in Postgres.  You
can't invoke methods on it in that form; you have to read it back in
and de-serialize it into a real object.

XML is text, and can be stored in Postgres like any other chunk of
text.  To do anything with it, though, you'll need to read it back out
and parse it using SAX or another XML parser.

Hope this helps...

-Doug

pgsql-general by date:

Previous
From: "Dan Wilson"
Date:
Subject: Re: version issue?
Next
From: Doug McNaught
Date:
Subject: Re: Problem with host connection