I could make an application to export the contents of a Text field to Bytea without problems, but as they are thousands of records I believe that if I do via SQL it will be faster.
If this is possible of course.
I have a table with a text field Text type, the content of this field is a complex text, I need to transform this text and RTF (RichEdit) and then write it in the Auxiliary field type Bytea, which receives binary files. >
How can I get an UPDATE of a Text field for a Bytea?
Example:
update tabela1 set campobytea = campotexto
where (codigo = 1234)
I've tried with CAST, but it can not turn the text into binary