The following bug has been logged online: Bug reference: 2041 Logged by: sebastien mayer Email address: [EMAIL PROTECTED] PostgreSQL version: 8.04 Operating system: linux fedora core 4 Description: annoyance with COPY Details:
in : copy table to file got the constraint that 'file' has to be a literal. 'file' can not be a text variable. That is not fair ! I want peoples using my application creates backup of parts of the data. The directory where the extracted data is something like : /tmp/briosoft_temp/<UserID>/ So i construct a text variable to hold the filename. In fact the whole command that i EXECUTE. The usage could be simplified if you accept text variable as 'file'. By the way, as soon as you want to deal with backups of datas and large_objects, you touch the file system : in a large company, the 1000's of users will not have all a DVD writer ! There is a centralized computer department where peoples deals with archive DVD-ROM's and sometimes send them back to the user who asked for it. This means we need functions to mkdir, rmdir, even a system call in order to tar and mkisofs the result of the backup/archive. We could even cdrecord !! OK, you don't want SQL becomes PHP. Anyway, with the opportunity to add functions with C, you may consider the question answered. have a good day.... seb ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly