![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I want to follow what is suggested here. How are STDIN and STDOUT addressed when using the JDBC driver? |
#2
| |||
| |||
|
|
Bernard wrote: I want to follow what is suggested here. How are STDIN and STDOUT addressed when using the JDBC driver? The current JDBC driver doesn't support this mode of COPY. There was some work done in the past to support this but it never got to the point of making it into the official driver; see the pgsql-jdbc archives for details. -O ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
#3
| |||
| |||
|
|
The majority of JDBC users trying to bulk load tables would not want to send the data through their connection. This connection is designed to send commands and to transfer only as much data as necessary and as little as possible. |
|
The need is only created by the limitations of the Postgres COPY command. I can't see why a workaround should be developed instead of or before fixing the COPY command. It works in other DB engines. |
#4
| |||
| |||
|
|
Bernard wrote: The majority of JDBC users trying to bulk load tables would not want to send the data through their connection. This connection is designed to send commands and to transfer only as much data as necessary and as little as possible. I don't understand why this is true at all -- for example, our application currently does bulk INSERTs over a JDBC connection, and moving to COPY has been an option I looked at in the past. Importing lots of data from a remote machine is hardly an uncommon case. The need is only created by the limitations of the Postgres COPY command. =20 I can't see why a workaround should be developed instead of or before fixing the COPY command. =20 It works in other DB engines. I guess that other DB engines don't care about unprivileged DB users reading any file that the backend can access. -O ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
#5
| |||
| |||
|
|
This difference of performance is the main reason for the COPY command, and this is also the reason why bulk loading through the JDBC interface will never match the performance of the COPY fith files command. |
|
The whole architectural setup for such "bulk" loading is a mess. |
#6
| |||
| |||
|
|
Oliver and interested list members: |
#7
| |||
| |||
|
|
Bernard wrote: The majority of JDBC users trying to bulk load tables would not want to send the data through their connection. This connection is designed to send commands and to transfer only as much data as necessary and as little as possible. I don't understand why this is true at all -- for example, our application currently does bulk INSERTs over a JDBC connection, and moving to COPY has been an option I looked at in the past. Importing lots of data from a remote machine is hardly an uncommon case. |
|
The need is only created by the limitations of the Postgres COPY command. I can't see why a workaround should be developed instead of or before fixing the COPY command. It works in other DB engines. I guess that other DB engines don't care about unprivileged DB users reading any file that the backend can access. -O ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
#8
| |||
| |||
|
|
2) Split up security risk calculations between the two directions "TO" and "FROM" and relax security. Look at MySQL for clues. The application developer can manage security on file system permission level. |
#9
| |||
| |||
|
|
My suggestions for improving the COPY command so it can be used by non-superuser users would be as follows: |
#10
| |||
| |||
|
|
It sounds like what you really want is the ability to grant something like FILE access without granting all superuser rights? Sounds like a feature request, not a bug, to me :-) |
![]() |
| Thread Tools | |
| Display Modes | |
| |