Buenos días,

He venido desarrollando una aplicación en .Net con postgres 8.4, recientemente me he migrado a Postgres 9.0, mis archivos de reportes los guardo en una tabla de la base de datos, con un schema parecido a este: "create table informes (id serial, archivo_rpt bytea)"


En visual utilizo el objeto Npgsql y para trabajar con esa tabla insertando los archivos rpt y extrayendo dichos archivos utilizo la guia de usuario del sitio de Npgsql (http://npgsql.projects.postgresql.org/docs/1.0/manual/UserManual.html); en lo referente al tema "Working with binary data and bytea datatype".

Ahora bien en postgres 8.4, me funciona de maravilla ahora en la versión 9.0, No funciona bien; los archivos que crea cuando extraigo los rpt salen corruptos.

Leyendo la referencia de postgres 9.0 me he topado con esto:

The bytea type supports two external formats for input and output: PostgreSQL's historical "escape" format, and "hex" format. Both of these are always accepted on input. The output format depends on the configuration parameter bytea_output <http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT>; *the default is hex.* (Note that the hex format was introduced in PostgreSQL 9.0; earlier versions and some tools don't understand it.)

Como hago para que no tome el valor default hex, porque creo que ese es mi problema.
-
Enviado a la lista de correo pgsql-es-ayuda ([email protected])
Para cambiar tu suscripción:
http://www.postgresql.org/mailpref/pgsql-es-ayuda

Responder a