| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | James Orr <james(at)lrgmail(dot)com> | 
| Cc: | pgsql-interfaces(at)postgresql(dot)org | 
| Subject: | Re: bytea on windows perl client | 
| Date: | 2002-07-17 16:08:59 | 
| Message-ID: | 14471.1026922139@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-interfaces | 
James Orr <james(at)lrgmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James Orr | 2002-07-17 17:00:00 | Re: bytea on windows perl client | 
| Previous Message | James Orr | 2002-07-17 16:01:25 | bytea on windows perl client |