From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Orr <james@lrgmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: bytea on windows perl client
Date: Wed, 17 Jul 2002 12:08:59 -0400
Message-ID: <14471.1026922139@sss.pgh.pa.us> (raw)
In-Reply-To: <200207171201.25600.james@lrgmail.com>
References: <200207171201.25600.james@lrgmail.com>
James Orr <james@lrgmail.com> writes:
> I have some code which runs fine on linux. It simply pulls a png from a bytea
> column and displays it.
> Now I need to get it running on windows. We have installed ActiveState perl
> with the DBI module and downloaded and installed the DBD-Pg binary.
> Connections to the database are working fine, but the png file is getting
> corrupted.
> Anybody know the work-around?
I'd bet money that the problem is a newline conversion issue --- you
could check by noticing whether the PNG signature (first 8 bytes of the
file) comes back correctly or not. The signature is designed to get
changed if it's fed through any of the standard kinds of newline
conversion (\n -> \r\n, for example).
Not that this gives any immediate suggestion for a fix, but
understanding what is happening is always a good first step.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, james@lrgmail.com
Subject: Re: bytea on windows perl client
In-Reply-To: <14471.1026922139@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox