|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
remote text file data copy using JBDC
Hi,
I hav text files which i have generated by paring the XML files using the XALAN processor. Now, i want to copy the data in the text file in the database which is on some remote machine. i m using JAVA (JDBC) on the client side. My text file is in the format which is required by the postgresql COPY command(with delimiters). Instead of calling multiple INSERT commands from the client application, i want to somehow send the file(stream or anything) to the database and use the COPY command. Does anyone knows how to get over this problem? thanks for all ur replies in advance. Ketan. |
|
#2
|
|||
|
|||
|
RU going to have to do this over and over frequently, or more like a batch job? (will it create consistent network traffic?) I am just confused about your approach-- if you parse the XML into INSERT statements for a schema that already exists then you will just run the insert statements. You could run a whole file of INSERTs or COPYs with psql, just run a local script from the java or I am not sure if you can do exec() from a java program but just run the SQL from the file with a psql command.
I've found some stuff in the manual about the COPY command, here . That's for 7.3, shouldn't be that much different though. |
|
#3
|
|||
|
|||
|
thank u so much for ur reply
. |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > remote text file data copy using JBDC |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|