From: | juanramirez <juanramirez(at)cajazacate(dot)com(dot)sv> |
---|---|
To: | pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | campo bytea en postgres 9.0 |
Date: | 2010-09-17 17:20:27 |
Message-ID: | 4C93A35B.9010401@cajazacate.com.sv |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Rensi Arteaga Copari | 2010-09-17 19:18:04 | fatal out of shared memory postgres |
Previous Message | Jaime Casanova | 2010-09-16 17:52:49 | Re: time |