From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | <postgre(at)seznam(dot)cz>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: large object import |
Date: | 2008-03-10 07:30:55 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C201D80C9D@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> postgre(at)seznam(dot)cz wrote:
> I am having a stored function in plperlU which is called from
> php script then. It select data from a table, export them to
> a file and zips the file. The problem is that it should store
> this file into temporary table. Then it should return some
> identificator to php, so that the user can download it via
> php. Problem is that postgreSQL doesn't supports server-side
> large object operations for non superuser roles.
PostgreSQL supports server-side large object operations for non-superusers.
Functions that access the file system are restricted to superusers.
> Can someone please give me a suggestion how can I solve this
> problem. I mean if I can import the file some other way or if
> there are some other usual procedures how to do this?
You can create a function with SECURITY DEFINER that is owned
by a superuser. That way you can make certain restricted functionality
available to regular users. You should be careful and as restrictive
as possible when writing such functions.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2008-03-10 07:46:38 | Re: how do you write aggregate function |
Previous Message | Leif Jensen | 2008-03-10 07:09:14 | Multithread problem: Error in transaction processing |