From: | "RaviShankar K" <ravi(at)e-jan(dot)co(dot)jp> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | field of type oid |
Date: | 2001-08-06 18:00:57 |
Message-ID: | 01d901c11ea1$bf1c10a0$0400a8c0@ejan.net |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi ,
I have 2 tables in my postgres DB .
2 tables have a field "my_image" of type "oid" ( Blob) .
I have to
1.get a row from table A
2.insert it in table B
3.delete that from table A .
Can I do like this ?
ResultSet rs ;
PreparedStatement pstmt;
String qry2 = "SELECT * FROM A";
String qry = "INSERT INTO B (my_image) VALUES(?)";
/*This part is doubtful to me */
pstmt.setInt(rs.getInt("my_image"));
I am using rs.getInt() because I need only oid . It is working fine
when I tested this code.
I am able to insert integer in to field of type oid . I can retrieve
image(Blob object) from table B using that inserted integer.
However I don't know how much correct this way is . Please advice me.
Thanks in advance.
Regards,
Ravi
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2001-08-07 02:04:24 | Re: field of type oid |
Previous Message | Barry Lind | 2001-08-06 16:31:16 | Re: Retrieving field of type bigint[] |