Re: Client-site "lo_export"

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: whiplash <whiplash(at)bss(dot)org(dot)ua>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Client-site "lo_export"
Date: 2011-10-28 20:00:33
Message-ID: CAAfz9KPtLJnf0GPHy=NV2a1C=8OT1FJUvFKyttSP9roUt_z69w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey,

2011/10/28 whiplash <whiplash(at)bss(dot)org(dot)ua>

> Hello!
>
> I use client-side "lo_export" for save large object to file. If i login as
> database owner then i do not have error (output file exists), but if i login
> as not database owner then function "lo_export" returning -1. My code is
> simple:
>
> PGresult *res = PQexec(pg_conn, "begin");
>
> PQclear(res);
>
> int ret = lo_export(pg_conn, repo_oid, filename);
>
> res = PQexec(pg_conn, "end");
>
> PQclear(res);
>
>
> OS: Win7, 32-bit
> PostgreSQL: 9.1.0
>
> What could be the problem?
>
> Thank you for helping!
>
I guess it's because of insufficient privileges on the LOB.
Please refer this URL:
http://www.postgresql.org/docs/9.1/static/lo-implementation.html

--
// Dmitriy.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2011-10-28 20:38:09 Re: From select to delete
Previous Message Alexander Farber 2011-10-28 17:55:08 Re: From select to delete