Bruce Momjian <[EMAIL PROTECTED]> writes: > I will do it by vote, not because _I_ decide it is unintuitive. And I > don't have to talk _you_ into it, just a majority of developers.
[shrug...] Put it to a vote if you want; I feel sure you will lose. There is another argument in favor of being able to read COPY data from stdin (ie, not from the command script), which is that it is a security feature that can help prevent SQL-injection attacks. In the example of data-source-program | psql -f script the upstream program *cannot* insert any SQL commands, it can only source data that will go into exactly the table the script specifies. The workaround you proposed of having the upstream issue COPY for itself is insecure; it's quite analogous to allowing a user to enter unquoted data into a SQL command string. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match