MaxLongVarChar and new lines in text

From: Åsmund Kveim Lie <akl(at)nosyko(dot)no>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: MaxLongVarChar and new lines in text
Date: 2006-03-23 16:03:06
Message-ID: 4422C6BA.60209@nosyko.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I'm having a problem with line breaks and the MaxLongVarChar setting.
I'm using Postgrsql 8.1.3 and ODBC version 08.01.0200(ansi). When I set
MaxLongVarChar <= 16383 it gives different results than using
MaxLongVarChar > 16383 or MaxLongVarChar = -4 (which is no limit). I
insert a newline in the db like this: INSERT INTO test VALUES ('\n');
and then retrieve it from my odbc app and write the result to a file.
CommLogs and result files are attached.

When using a small MaxLongVarChar value the result is (in hex) 0a0d (new
line, carriage teturn). For large MaxLongVarChar its 000a (new line
only). Any Windows app requires both new line and carriage return to
display new line correct. Any reason why this should differ when using
bigger values in MaxLongVarChar? We use the LF<->CR/LF conversion on.

I'm using 16383 in my app to day and it would be nice to increase this
without breaking my app.

Regards,

Åsmund Kveim Lie

Attachment Content-Type Size
psqlodbc_5840.log application/octet-stream 1.6 KB
psqlodbc_5600.log application/octet-stream 1.6 KB
8.1-16383 application/octet-stream 1 byte
8.1-4 application/octet-stream 0 bytes

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Ludek Finstrle 2006-03-24 08:33:09 Re: ADO operations
Previous Message Åsmund Kveim Lie 2006-03-23 15:51:09 Text arrays fails with MaxVarCharSize > 16383