Re: Proposal: functions get_text() or get_url()
От | Robert Haas |
---|---|
Тема | Re: Proposal: functions get_text() or get_url() |
Дата | |
Msg-id | 603c8f070905181350p5ac2d829i4fd2a525e5e85ee7@mail.gmail.com обсуждение исходный текст |
Ответ на | Proposal: functions get_text() or get_url() (Stefan Keller <sfkeller@gmail.com>) |
Ответы |
Re: Proposal: functions get_text() or get_url()
|
Список | pgsql-hackers |
On Mon, May 18, 2009 at 4:03 PM, Stefan Keller <sfkeller@gmail.com> wrote: > How to insert a text file into a field in PostgreSQL? > I'd like to insert a row with fields from a local or remote text file. > I'd expect functions like get_text() or get_url() in order to do the > following: > INSERT INTO collection(id, path, content) VALUES(1, '/tmp/mytext, > get_text('/tmp/mytext)); > AFAIK there was a get_url in libcurl but I neither find it any more. But > anyway: This should be part of the core... :-> Putting this into core would have security implications. The file or URL would be downloaded by the PostgreSQL server process, not the client process - therefore I think it would have to be super-user only, which would make it much less useful. You'd also need a pretty rich API to mimic all the crazy thinks a URL-fetching library like libcurl knows how to do. Except for very large objects where double-copying must be avoided, it seems like having the client retrieve and pass the data is a simpler solution. That having been said, nobody can stop you from writing (and submitting) a patch. ...Robert
В списке pgsql-hackers по дате отправления: