mysql load_file() function

Ask a Question related to PostgreSQL / PGSQL, Design and Development.

  1. #1

    Default mysql load_file() function

    Hi all,

    Does anyone know if PostgreSQL got a function which work like
    load_file() of mySQL?
    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
    3. Apache 1.3.26

    Thanks in advance,
    Ben-Nes Yonatan


    Ben-Nes Yonatan Guest

  2. Similar Questions and Discussions

    1. #40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
      From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ...
    2. printf-like function in mysql
      Hi, I am trying to format my number, so that it shows 2 places after the decimal point, even when they are 00. I found the FORMAT() function, but...
    3. mysql with php 4.3.4 - function not present??
      On a fresh build of 4.3.4, with --with-mysql=shared,/usr it compiles just fine. /usr/lib/mysql is present in ld.so.conf A...
    4. PHP MySQL based diary function
      Can anyone recommend a program (freeware, shareware, license, etc.) in PHP MySQL that would allow a group of people to share a calendar to see when...
    5. Need hep with mysql function
      Hi, I encountered a problem that I have never seen in my 3 years of using php and mysql. Yesterday, I installed MySql, php5, and apache2 on my...
  3. #2

    Default Re: mysql load_file() function

    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
    > 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 ;)
    > 3. Apache 1.3.26
    >
    > Thanks in advance,
    > Ben-Nes Yonatan
    >
    HTH :)

    Cheers,
    D
    --
    David Fetter [email]david@fetter.org[/email] [url]http://fetter.org/[/url]
    phone: +1 510 893 6100 mobile: +1 415 235 3778

    Remember to vote!

    ---------------------------(end of broadcast)---------------------------
    TIP 8: explain analyze is your friend

    David Fetter Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139