>On Fri, Feb 04, 2005 at 09:27:08AM +0200, Ben-Nes Yonatan wrote: >> Hi all, >> >> Does anyone know if PostgreSQL got a function which work like >> load_file() of mySQL? > > I am not quite sure what load_file() does, but check the COPY command > and the analgous \copy in psql. As with many other PostgreSQL > commands, COPY has a man page in lower case: > > man copy > First thanks for your answer David but im afraid that i still got a problem with this solution... im not trying to upload a big file which contain data which is supposed to be divided to plenty of rows, i want to upload a big file (wav,ppt,whatever...) into one column one row... maybe i can use COPY to upload the rows to a temp_table and then from there build the file at the primary table so it will be only postgresql working in his own enviroment... though that seem "too heavy" isnt there a better elegant solution? >> I need it for uploading of big files... i encounter a memory limit when >> i try to upload a query with the file data in it and i recieved this >> response for a question about it at php-general maillist: >> "load_file() is mysql internal function. the file is read by mysql >> server, so it completely bypass php and also client libraries. you need >> to have file priviledge." >> Or maybe there is another way to upload big queries without running off >> the memory limit? >> Another recommendation that i received is to just upload the files to >> the file system... but then ill lose the integrity of the database >> (though i can make safety checks to know that everything is as it should >> be) so i prefer to find a way to insert it to the DB. >> >> My server is as follows: >> 1. PHP 4.3.9 >> 2. DB - Postgresql 7.4 >Consider getting PostgreSQL 8.0.1 (or whatever the latest is when you >get this message ;) Soon :) >> 3. Apache 1.3.26 >> >> Thanks in advance, >> Ben-Nes Yonatan >> >HTH :) >Cheers, >D >-- >David Fetter david@xxxxxxxxxx http://fetter.org/ >phone: +1 510 893 6100 mobile: +1 415 235 3778 > >Remember to vote! Whats HTH? and to what should i vote? ;) Thanks alot Yonatan ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend