Re: Postgres blob question - insert from basic.

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres blob question - insert from basic.
Date: 2009-11-24 11:23:01
Message-ID: hegfml$83k$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


> If you really want to have your blobs stored in the database, I'd
> recommend using a "bytea" column as Jean-Yves suggests -- this way you
> won't need superuser privs to insert your data, and you'll avoid the
> additional complication of lo_import() only working on files on the
> server's filesystem. There might be a way to insert OID records
> without using lo_import() and without needing PG superuser privileges,
> but I haven't tried.

there is an sql method but I have not found the documentation (it's used in SQL
backups) there's also the libpq lo_open lo_read lo_write functions

that said bytea works well for most purposes, if working in raw sql encode()
can be used to convert the double-escaped data to more easily handled base64

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message richard terry 2009-11-24 11:36:04 Re: Postgres blob question - insert from basic.
Previous Message Josh Kupershmidt 2009-11-23 22:34:50 Re: Postgres blob question - insert from basic.