Search Postgresql Archives

Re: Storing images as BYTEA or large objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Koen Vermeer wrote:

> Instead of base64 encoding, I guess it would be easier to just escape
> the required bytes and store them in a bytea.

Actually, if you have access to the pqExecParams() call, you can pass
the bytes to a bytea column unescaped, which AFAIK saves some processing
on both the client and server.

To get the bytes back unescaped, I think you could use a binary cursor.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux