From: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
---|---|
To: | "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: java_objects and create table |
Date: | 2003-08-30 09:12:31 |
Message-ID: | 20030830101231.A28027@bacon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 29/08/2003 16:02 Andrew Hart wrote:
> I am trying to store a java_object into a database using code:
> try {
> s.executeUpdate( "create table regions2 ( region java_object );" );
> }
> catch (SQLException e) {
> System.out.println("Error creating:" + e.getMessage());
> }
>
>
> Error creating:ERROR: Unable to locate type name 'java_object' in
> catalog
> JDK14 pg73jdbc3 pg7.2.1
>
> What is going wrong? I would assume that the java_object type is not
> supported but is there an alternative type so that I can use a prepared
> statement and a setObject( myRegion ) call to add my object to the
> database?
AFAIK, there's no such data type as java_object and I'm not sure how you
would be led to believe otherwise. It might be possible to serialize your
object abd store it as a Large Object (see section 8.6 Storing Binary Data
in your PostgrSQL docs).
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2003-08-31 19:06:17 | Re: Passing server_encoding to the client is not future-proof |
Previous Message | snpe | 2003-08-30 04:32:23 | Re: Caching |