Re: Storing jpgs
| От | Bill Moran |
|---|---|
| Тема | Re: Storing jpgs |
| Дата | |
| Msg-id | 407300C8.5000705@potentialtech.com обсуждение исходный текст |
| Ответ на | Re: Storing jpgs (Joe Lester <joe_lester@sweetwater.com>) |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: