2012-05-30 7 views
4

Heroku Postgres가 BLOB를 허용하지 않는 경우 바이너리 데이터를 저장하려면 어떻게해야합니까?Heroku BLOB가 존재하지 않습니다.

2012-05-30T05:59:36+00:00 app[web.1]: [debug] c.j.b.StatementHandle - create table image_info (
2012-05-30T05:59:36+00:00 app[web.1]: id      bigint not null, 
2012-05-30T05:59:36+00:00 app[web.1]: image_id     varchar(255), 
2012-05-30T05:59:36+00:00 app[web.1]: subject_id    varchar(255), 
2012-05-30T05:59:36+00:00 app[web.1]: web_thumbnail    blob, 
2012-05-30T05:59:36+00:00 app[web.1]: created_date    timestamp, 
2012-05-30T05:59:36+00:00 app[web.1]: image      blob, 
2012-05-30T05:59:36+00:00 app[web.1]: thumbnail     blob, 
2012-05-30T05:59:36+00:00 app[web.1]: constraint pk_image_info primary key (id)) 
2012-05-30T05:59:36+00:00 app[web.1]: [debug] c.j.b.PreparedStatementHandle - update play_evolutions set last_problem = 'ERROR: type "blob" does not exist 
2012-05-30T05:59:36+00:00 app[web.1]: Position: 176 [ERROR:0, SQLSTATE:42704]' where id = 1 

답변

6

사용 bytea, blob은 PostgreSQL 데이터 유형이 아닙니다.

+0

변경된 것 같습니다. https://wiki.postgresql.org/wiki/BinaryFilesInDB –

+0

@ChrisNicola 위키 페이지가 약간 혼란 스럽습니다. 기본적으로 Postgres 용 "blob"은 대용량 객체 지원 (거의 필요하지 않음)을 나타내는 반면, BYTEA는 MySQL의 BLOB와 비슷한 임의 길이의 이진 데이터를 참조합니다. – rogerdpack

관련 문제