Re: insert bytea data manually

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: insert bytea data manually
Дата
Msg-id Pine.BSO.4.61.0510031759030.30667@leary.csoft.net
обсуждение исходный текст
Ответ на insert bytea data manually  (Muhlis Akdag <mican58@gmail.com>)
Список pgsql-jdbc

On Mon, 3 Oct 2005, Muhlis Akdag wrote:

> I have a question about bytea columns. I want manually select the column..
> this looks like this..when I export it from pgadmin into a csv file..
> "10";"PK\003\004\024\000\000\000\000\000\214\22453\341\24519\036\000\000\000\03.........."
>
> so how I can inert it back to the database manually.. like this..
>
> insert into files (docid,file) values
> (1,'PK\003\004\024\000\000\000\000\000\214\22453\341\24519\036\000\000\000\03..........")
>

See the documentation for the correct escapting you will need.

http://www.postgresql.org/docs/8.0/static/datatype-binary.html

You need to double the backslashes when sending the data to the backend.

Kris Jurka


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Muhlis Akdag
Дата:
Сообщение: insert bytea data manually
Следующее
От: Amit Kumar
Дата:
Сообщение: give_solution