Search Postgresql Archives

Re: Storing jpgs

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

 



Joe Lester wrote:
Would anyone have some example code they could share using libpq to encode an image into a text field? Right now, I'm converting my image into a hexadecimal string representation in my SQL statement. I'm sure there must be a better (faster) way. The hex encodeing/decoding slows things down for me since my app deals with a lot of images.

Is this what you're looking for?: http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA

I don't have actual numbers to support it, but I would expect that using
Postgres' escape function will be faster since it only escapes what
absolutely must be escaped.

HTH

--
Bill Moran
Potential Technologies
http://www.potentialtech.com


---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly

[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